Skip to content

Commit 66323f9

Browse files
Merge pull request #1456 from OpenSignLabs/uncompatible_pdf
fix: otp auth must be disable in certificate if OTP verification is off
2 parents 9bf93fb + c65f17a commit 66323f9

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,17 @@ export default async function GenerateCertificate(docDetails) {
458458
});
459459

460460
currentPage.drawText('Viewed on :', {
461-
x: half,
461+
x: half + 55,
462462
y: yPosition2,
463-
size: text,
463+
size: timeText,
464464
font: timesRomanFont,
465465
color: textKeyColor,
466466
});
467467

468468
currentPage.drawText(`${new Date(x.ViewedOn).toUTCString()}`, {
469-
x: half + 75,
469+
x: half + 112,
470470
y: yPosition2,
471-
size: text,
471+
size: timeText,
472472
font: timesRomanFont,
473473
color: textValueColor,
474474
});
@@ -490,17 +490,17 @@ export default async function GenerateCertificate(docDetails) {
490490
});
491491

492492
currentPage.drawText('Signed on :', {
493-
x: half,
494-
y: yPosition3,
495-
size: text,
493+
x: half + 55,
494+
y: yPosition3 + 5,
495+
size: timeText,
496496
font: timesRomanFont,
497497
color: textKeyColor,
498498
});
499499

500500
currentPage.drawText(`${new Date(x.SignedOn).toUTCString()}`, {
501-
x: half + 70,
502-
y: yPosition3,
503-
size: text,
501+
x: half + 108,
502+
y: yPosition3 + 5,
503+
size: timeText,
504504
font: timesRomanFont,
505505
color: textValueColor,
506506
});
@@ -520,22 +520,23 @@ export default async function GenerateCertificate(docDetails) {
520520
font: timesRomanFont,
521521
color: textValueColor,
522522
});
523-
currentPage.drawText('Security level :', {
524-
x: half,
525-
y: yPosition4,
526-
size: text,
527-
font: timesRomanFont,
528-
color: textKeyColor,
529-
});
530-
531-
currentPage.drawText(`Email, OTP Auth`, {
532-
x: half + 90,
533-
y: yPosition4,
534-
size: text,
535-
font: timesRomanFont,
536-
color: textValueColor,
537-
});
538523

524+
if (IsEnableOTP) {
525+
currentPage.drawText('Security level :', {
526+
x: half + 55,
527+
y: yPosition4 + 10,
528+
size: timeText,
529+
font: timesRomanFont,
530+
color: textKeyColor,
531+
});
532+
currentPage.drawText(`Email, OTP Auth`, {
533+
x: half + 125,
534+
y: yPosition4 + 10,
535+
size: timeText,
536+
font: timesRomanFont,
537+
color: textValueColor,
538+
});
539+
}
539540
currentPage.drawText('Signature :', {
540541
x: 30,
541542
y: yPosition5,

0 commit comments

Comments
 (0)