combine_pdf icon indicating copy to clipboard operation
combine_pdf copied to clipboard

Web optimized PDFs improperly parsed

Open ndvo opened this issue 1 year ago • 0 comments

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"]}

ndvo avatar Mar 10 '23 17:03 ndvo