combine_pdf
combine_pdf copied to clipboard
Web optimized PDFs improperly parsed
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"]}