@@ -15,6 +15,7 @@ export default async function GenerateCertificate(docDetails) {
15
15
const title = 25 ;
16
16
const subtitle = 20 ;
17
17
const text = 14 ;
18
+ const timeText = 11 ;
18
19
const textKeyColor = rgb ( 0.12 , 0.12 , 0.12 ) ;
19
20
const textValueColor = rgb ( 0.3 , 0.3 , 0.3 ) ;
20
21
const completedAt = new Date ( ) ;
@@ -280,17 +281,17 @@ export default async function GenerateCertificate(docDetails) {
280
281
} ) ;
281
282
282
283
page . drawText ( 'Viewed on :' , {
283
- x : half ,
284
+ x : half + 55 ,
284
285
y : yPosition2 ,
285
- size : text ,
286
+ size : timeText ,
286
287
font : timesRomanFont ,
287
288
color : textKeyColor ,
288
289
} ) ;
289
290
290
291
page . drawText ( `${ new Date ( x . ViewedOn ) . toUTCString ( ) } ` , {
291
- x : half + 75 ,
292
+ x : half + 112 ,
292
293
y : yPosition2 ,
293
- size : text ,
294
+ size : timeText ,
294
295
font : timesRomanFont ,
295
296
color : textValueColor ,
296
297
} ) ;
@@ -312,17 +313,17 @@ export default async function GenerateCertificate(docDetails) {
312
313
} ) ;
313
314
314
315
page . drawText ( 'Signed on :' , {
315
- x : half ,
316
- y : yPosition3 ,
317
- size : text ,
316
+ x : half + 55 ,
317
+ y : yPosition3 + 5 ,
318
+ size : timeText ,
318
319
font : timesRomanFont ,
319
320
color : textKeyColor ,
320
321
} ) ;
321
322
322
323
page . drawText ( `${ new Date ( x . SignedOn ) . toUTCString ( ) } ` , {
323
- x : half + 70 ,
324
- y : yPosition3 ,
325
- size : text ,
324
+ x : half + 108 ,
325
+ y : yPosition3 + 5 ,
326
+ size : timeText ,
326
327
font : timesRomanFont ,
327
328
color : textValueColor ,
328
329
} ) ;
@@ -338,22 +339,22 @@ export default async function GenerateCertificate(docDetails) {
338
339
page . drawText ( x ?. ipAddress , {
339
340
x : 100 ,
340
341
y : yPosition4 ,
341
- size : text ,
342
+ size : 13 ,
342
343
font : timesRomanFont ,
343
344
color : textValueColor ,
344
345
} ) ;
345
346
page . drawText ( 'Security level :' , {
346
- x : half ,
347
- y : yPosition4 ,
348
- size : text ,
347
+ x : half + 55 ,
348
+ y : yPosition4 + 10 ,
349
+ size : timeText ,
349
350
font : timesRomanFont ,
350
351
color : textKeyColor ,
351
352
} ) ;
352
353
353
354
page . drawText ( `Email, OTP Auth` , {
354
- x : half + 90 ,
355
- y : yPosition4 ,
356
- size : text ,
355
+ x : half + 125 ,
356
+ y : yPosition4 + 10 ,
357
+ size : timeText ,
357
358
font : timesRomanFont ,
358
359
color : textValueColor ,
359
360
} ) ;
@@ -368,7 +369,7 @@ export default async function GenerateCertificate(docDetails) {
368
369
369
370
page . drawRectangle ( {
370
371
x : 98 ,
371
- y : yPosition5 - 27 ,
372
+ y : yPosition5 - 30 ,
372
373
width : 104 ,
373
374
height : 44 ,
374
375
borderColor : rgb ( 0.22 , 0.18 , 0.47 ) ,
@@ -377,7 +378,7 @@ export default async function GenerateCertificate(docDetails) {
377
378
if ( embedPng ) {
378
379
page . drawImage ( embedPng , {
379
380
x : 100 ,
380
- y : yPosition5 - 25 ,
381
+ y : yPosition5 - 27 ,
381
382
width : 100 ,
382
383
height : 40 ,
383
384
} ) ;
0 commit comments