Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
DocumentContext.cpp
one comes straight from the ISO19005-1 standard clause 6.1.2, just added a new >127 bytePDFWriter.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: