How to create a PDF/A-3 file using Javascript?

601 Views Asked by At

Is it practically possible to create a PDF/A-3 document using any Javascript libraries?

2

There are 2 best solutions below

1
Gwhyyy On

Yes you can actually, with jsPDF, you can check it from here

it let you creates pdf files like this:

var doc = new jsPDF()

doc.setFontSize(40)
doc.text(35, 25, 'Example text')
0
K J On

PDFLib (as per question tagged)

is certainly able to produce PDFA/3 compliant PDF files, for human testing, however it requires Java or other midlevel languages to drive the API (not JavaScript) But you can use Java scripting inside the PDF produced.

Produces

  • PDF/A-1,
  • PDF/A-2
  • and PDF/A-3

(PDF/A-4 support in development).

see https://www.pdflib.com/pdf-knowledge-base/pdfa/pdfa-in-pdflib/

jsPDF (as per question tagged)

CanNOT meet any one of the 3 levels of PDF/A-3 requirements although by many simple binary additions it could.

It is javascript output that is unable to compete with midlevel binary PDF producers.