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

Web optimized PDFs improperly parsed #225

Open
ndvo opened this issue Mar 10, 2023 · 0 comments
Open

Web optimized PDFs improperly parsed #225

ndvo opened this issue Mar 10, 2023 · 0 comments

Comments

@ndvo
Copy link

ndvo commented Mar 10, 2023

When parsing a file that was web optimized the resulting root_object contains only :Size and :ID.

Steps to reproduce:

Select a PDF file and optimize it for the web:
- You can use this tool for it: https://tools.pdf24.org/en/optimize-pdf
- Upload the protected file and get the optimized file

   file = CombinePDF::PDFParser.new(value.read, allow_optional_content: true)
   file.parse
   file.root_object

Result will be something like:

{:Size=>6, :ID=>["\x00\x00\x00...\x00", "19v\x00\x00...\x00"]}

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

1 participant