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

Validation error for PDF 1.4 file #80

Closed
leowmjw opened this issue Apr 28, 2019 · 1 comment
Closed

Validation error for PDF 1.4 file #80

leowmjw opened this issue Apr 28, 2019 · 1 comment
Assignees

Comments

@leowmjw
Copy link

leowmjw commented Apr 28, 2019

Noticed the validate command for PDF 1.4 is failing for the following:
http://www.parlimen.gov.my/files/jindex/pdf/Pertanyaan%20Jawapan%20Bukan%20Lisan%2022019.pdf

Details:

$ ~/go/bin/pdfcpu validate  ~/Desktop/Pertanyaan\ Jawapan\ Bukan\ Lisan\ 22019.pdf
validating(mode=relaxed) /Users/mleow/Desktop/Pertanyaan Jawapan Bukan Lisan 22019.pdf ...
validation error: dict=pagesDict entry=Tabs: unsupported in version 1.4
This file could be PDF/A compliant but pdfcpu only supports versions <= PDF V1.7

Is this a bug or is their PDF generation (via iText) incorrect?

NOTE: A hexedit of the PDF version to 1.7 passes the validation. Thanks!

@hhrutter
Copy link
Collaborator

According to the PDF spec within a page dictionary the Tabs entry is optional starting with V1.5:

Screenshot 2019-04-28 at 23 11 45

I don't know why iText produces something like this, but in the real world we have also
other PDF Writers whose results pdfcpu needs to be able to digest at the end of the day,
I will extend relaxed validation to include cases like this one.

Thanks for helping to improve pdfcpu 💚

@hhrutter hhrutter self-assigned this Apr 28, 2019
hhrutter added a commit that referenced this issue May 10, 2019
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

2 participants