Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF/A compliance #18

Open
carstenblt opened this issue Dec 15, 2024 · 6 comments
Open

PDF/A compliance #18

carstenblt opened this issue Dec 15, 2024 · 6 comments

Comments

@carstenblt
Copy link

ERPNext PDFs don't seem to comply with PDF/A:

Bildschirmfoto 2024-12-15 um 19 47 27
@0xD0M1M0
Copy link

0xD0M1M0 commented Dec 15, 2024

I believe this not directly ERPNext related. Factur-X creates the final PDF/A-3. Still doesn't change the fact, that errors are raised.

@0xD0M1M0
Copy link

@carstenblt
Copy link
Author

Factur-X cannot fix the PDF, if it's already non-conformant: akretion/factur-x#1

ERPNext still creates PDFs with wkhtmltopdf, right? I fear then there is not a lot you can do about it.

@0xD0M1M0
Copy link

Checking the direct ERPNext Output, the "error" seems to be present there already:

  • PDF/A requires if DeviceGrey, DeviceRGB or DeviceCMYK is used, that an Output Intent with a Colorprofile has to be present.
  • ID-Entry with two Hex-Values is missing in the File End

@0xD0M1M0
Copy link

Factur-X cannot fix the PDF, if it's already non-conformant: akretion/factur-x#1

Ok, understood.

ERPNext still creates PDFs with wkhtmltopdf, right? I fear then there is not a lot you can do about it.

wkhtmltopdf is used for some things and pypdf for others:

https://github.com/frappe/frappe/blob/9fd891d01eb6b7d4a03fa0fe1762ae1a8ce8fe50/frappe/utils/print_format.py#L7

Maybe a step in between can fix the mess and convert the output into PDF/A-3 before merging:
https://www.python-forum.de/viewtopic.php?t=44286

@timschneider
Copy link
Contributor

timschneider commented Jan 3, 2025

I have implemented a conversion using Ghostscript https://ghostscript.readthedocs.io/en/latest/VectorDevices.html#vectordevices-creating-pdfa in the PR #39. In this case, the PDF file is converted to PDF/A-3 by ERPNext before the XML data is added. This requires Ghostscript to be installed on the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants