Forum Discussion
TracyCarroll
8 years agoCommunity Member
Help - Calling all Javascript experts!
I hope you can help me with this problem. I need to know the Javascript to insert an action in a PDF form field.
I have a client who wants learners to be able to print a PDF certificate with the u...
annekalinic
3 years agoCommunity Member
Hello,
even if this post is quite old, I hope someone can help!
I'm creating a PDF certificate, however, on the certificate, I don't know how to add the date in the right place after the text "In Rennes, the ..." in the ultimate line of the document (see the document attached).
I'm having issues setting the right coordinates for the date, which should be more on the right :
var img = new Image; img.onload = function() { doc.addImage(this, 0, 0, 297, 210); doc.setFontSize(40); doc.setTextColor(0, 0, 0); doc.setFont('Times-Bold', 'bold'); doc.text(certName, (doc.internal.pageSize.width / 2), 96, null, null, 'center'); doc.setFont('Times-Roman', 'normal'); doc.setFontSize(16); doc.text(date, (doc.internal.pageSize.width /2), 135, null, null, 'center'); doc.save("CertificatRGPD.pdf"); };
Any help is appreciated !!
Thank you