parallax / jsPDF

Client-side JavaScript PDF generation for everyone.
https://parall.ax/products/jspdf
MIT License
29.02k stars 4.64k forks source link

Generate PDF/A compliant document #2882

Open anujtripathi04 opened 4 years ago

anujtripathi04 commented 4 years ago

[Feature]

Hi there,

I have integrated jsPDF for a project but now that I realised its a strict requirement from the customer to have pdf file as PDF/A compliant which jsPDF doesn't generate. PDF/A is basically a plain PDF with fonts embedded in file itself. And also a min of pdfVersion = '1.4' should be used. Currently jsPDF genereates files of pdfVersion = '1.3'.

Is there a way to set the pdfVersion? And also genereate PDFs with PDF/A compliance?

More info on PDF/A - https://en.wikipedia.org/wiki/PDF/A#:~:text=PDF%2FA%20is%20an%20ISO,to%20font%20embedding)%20and%20encryption.

HackbrettXXX commented 4 years ago

The PDFs jsPDF generates are indeed not PDF/A compliant and currently there is nothing planned to implement it. If someone from the community prepares a pull request, we will happily merge it, though.

To set the PDF version you could use the private method setPdfVersion: doc.__private__.setPdfVersion("1.4").

Duplicate of #2782.

mariusheine commented 3 years ago

We need PDF/A support as well in our company GEPROG GmbH.

Maybe a good reference of how it can be implemented is the PHP TCPDF project https://github.com/tecnickcom/tcpdf. There they have this flag $this->pdfa_mode in there tcpdf.php file.

malte94 commented 2 years ago

Any news on delivering this feature?

AlexRoidl commented 1 year ago

I am also really interested in this feature. I think this would be a huge feature for all people working with printed PDFs.