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

Pdfa 1a #215

Merged
merged 2 commits into from
Jul 6, 2023
Merged

Pdfa 1a #215

merged 2 commits into from
Jul 6, 2023

Conversation

jjelosua
Copy link
Contributor

@jjelosua jjelosua commented Jul 6, 2023

Hi @galkahana,

First of all, thank you for your wok in this library and glad to see you have come back to it.

While using PDFWriter for a project we have detected that if the original document is pdfa-1a compliant simply recreating it or modifying it using some new IUs broke the standard validation (tested with: Verapdf and Avepdf).

As you can see the modifications are minimal but effective.

  • The DocumentContext.cpp one comes straight from the ISO19005-1 standard clause 6.1.2, just added a new >127 byte
  • The PDFWriter.cpp one is caused when we try to modify a PDF file using IUs, the first oject was added in the same line as the %%EOF of the original document causing an error in the validation. Just added a new line separator in ModifyPDFForStream in the same way that it was done in the ModifyPDF function above.

Attached you can see a screenshot of the xml report that avepdf provided with the error and a screenshot the chunk of the PDF where we have highlighted where the error that avepdf is complaining about is made:

pdfavalidation_xml

ModifyWithIUs_error_chunk

@galkahana
Copy link
Owner

Thanks man!
looks good. im gonna take it.

@galkahana galkahana merged commit bd78336 into galkahana:master Jul 6, 2023
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.

2 participants