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

feat(Sales Invoice): Convert the PDF data to PDF/A-3 using ghostscript. #39

Open
wants to merge 5 commits into
base: version-15
Choose a base branch
from

Conversation

timschneider
Copy link
Contributor

Convert PDF to PDF/A-3 if ghostscript is installed.
Fail on error and do not output pdf/a-3 data with xml data, erpnext will output the default pdf.

The switch "-dPDFACompatibilityPolicy=1", will behave like


PDFACompatibilityPolicy integer

    When an operation (e.g. pdfmark) is encountered which cannot be emitted in a PDF/A compliant file, this policy is consulted, there are currently three possible values:

    0 - (default) Include the feature or operation in the output file, the file will not be PDF/A compliant. Because the document Catalog is emitted before this is encountered, the file will still contain PDF/A metadata but will not be compliant. A warning will be emitted in this case.

    1 - The feature or operation is ignored, the resulting PDF file will be PDF/A compliant. A warning will be emitted for every elided feature.

    2 - Processing of the file is aborted with an error, the exact error may vary depending on the nature of the PDF/A incompatibility.

Maybe change it later to 2 or make it configurable.

Fail on error and do not output pdf/a-3 data with
xml data.

Convert PDF to PDF/A-3 if ghostscript is installed
@timschneider timschneider mentioned this pull request Jan 3, 2025
@0xD0M1M0
Copy link

0xD0M1M0 commented Jan 3, 2025

Does Ghostscript needs to be added to pyprojects.toml so it can be installed as dependency?

@timschneider
Copy link
Contributor Author

@0xD0M1M0

Does Ghostscript needs to be added to pyprojects.toml so it can be installed as dependency?

I don't know if it is possible to add an external dependency to the pyproject.toml that will be installed with the plugin.

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

Successfully merging this pull request may close these issues.

3 participants