update for license field in PDF, variable spacing
This commit is contained in:
parent
6d83786729
commit
42eb1a35a7
Binary file not shown.
@ -109,7 +109,7 @@ const fields = {
|
||||
fin_goals_trucks: { name: "nko_object_trucks", type: "text", bind: null, size: 6 },
|
||||
fin_goals_special: { name: "nko_object_special", type: "text", bind: null, size: 6 },
|
||||
},
|
||||
licenses: { name: "licenses", type: "text", bind: null, size: 4 },
|
||||
licenses: { name: "licenses", type: "text", bind: null, size: 5 },
|
||||
};
|
||||
|
||||
function good(value)
|
||||
@ -167,16 +167,16 @@ export default async function handler(req, res)
|
||||
width: 412,
|
||||
height: 26,
|
||||
color: rgb(0.87, 0.87, 0.87),
|
||||
});
|
||||
});
|
||||
|
||||
page.drawText(questionnaire[group], {
|
||||
x: 152,
|
||||
y: 195,
|
||||
size: fields[group].size,
|
||||
font: formFont,
|
||||
color: rgb(0, 0, 0),
|
||||
maxWidth: 412,
|
||||
lineHeight: 4,
|
||||
x: 152,
|
||||
y: questionnaire[group].length > 500 ? 195 : (questionnaire[group].length > 400) ? 195 : 193,
|
||||
size: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6,
|
||||
font: formFont,
|
||||
color: rgb(0, 0, 0),
|
||||
maxWidth: 412,
|
||||
lineHeight: questionnaire[group].length > 500 ? 4 : (questionnaire[group].length > 400) ? 5 : 6,
|
||||
});
|
||||
}
|
||||
else if(group === "founder_persons")
|
||||
@ -197,7 +197,7 @@ export default async function handler(req, res)
|
||||
const { placebirth, citizenship, doctype, seria, docnumber, code, issueby, issuedate, } = questionnaire[group][p].identity_document;
|
||||
fields[group][p][field].bind = form.getTextField(fields[group][p][field].name);
|
||||
if(fields[group][p][field].size !== undefined) { fields[group][p][field].bind.setFontSize(fields[group][p][field].size); }
|
||||
fields[group][p][field].bind.setText(`${ moment(birthdate).format("DD.MM.YYYY") }, ${ placebirth }, ${ citizenship.title }, ${ personal_doctypes[doctype].toString().toUpperCase() } ${ seria.toString() } ${ docnumber.toString() }, выдан ${ issueby.toString() } ${ moment(issuedate).format("DD.MM.YYYY") }, ${ code.toString() }`.toUpperCase());
|
||||
fields[group][p][field].bind.setText(`${ moment(birthdate).format("DD.MM.YYYY") }, ${ placebirth }, ${ citizenship.title }, ${ personal_doctypes[doctype].toString().toUpperCase() } ${ seria.toString() } ${ docnumber.toString() }, выдан ${ issueby.toString() }, ${ moment(issuedate).format("DD.MM.YYYY") }, ${ code.toString() }`.toUpperCase());
|
||||
}
|
||||
else if(field === "registration")
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user