0% found this document useful (0 votes)
59 views1 page

PDF Parsing Error Resolution in CombinePDF

This document discusses an issue where parsing a specific PDF file resulted in an "Unknown PDF parsing error - malformed PDF file" when using the CombinePDF Ruby gem. The original reporter provided the URL and code used, and the gem author identified that the PDF used a fragmented XREF table that the gem's updated parsing logic did not expect. The author released an update to the gem that addressed the issue.

Uploaded by

sha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views1 page

PDF Parsing Error Resolution in CombinePDF

This document discusses an issue where parsing a specific PDF file resulted in an "Unknown PDF parsing error - malformed PDF file" when using the CombinePDF Ruby gem. The original reporter provided the URL and code used, and the gem author identified that the PDF used a fragmented XREF table that the gem's updated parsing logic did not expect. The author released an update to the gem that addressed the issue.

Uploaded by

sha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Unknown PDF parsing error - malformed PDF file?

#140
Closed solasdev opened this issue on Jul 2, 2018 � 9 comments
Closed
Unknown PDF parsing error - malformed PDF file?
#140
solasdev opened this issue on Jul 2, 2018 � 9 comments
Comments
@solasdev
solasdev commented on Jul 2, 2018
When I run the following:
[Link] Net::HTTP.get_response([Link]('[Link]
files/BXCLawHERyydAiutimWT%[Link]')).body

i get...
Warning: parser advancing for unknown reason. Potential data-loss.
Warning: parser advancing for unknown reason. Potential data-loss.
CombinePDF::ParsingError: Unknown PDF parsing error - malformed PDF file?

Any ideas? I was combining this same file only a couple of months back with same
code, not sure what's changed to break it.

Thanks

@solasdev
Author
solasdev commented on Jul 2, 2018
I thought maybe like in another thread the url was using unsupported AESv2
encryption however if I download the file and try parse it I get the same error.

@boazsegev boazsegev closed this in 177dbf0 on Jul 2, 2018


@boazsegev
Owner
boazsegev commented on Jul 2, 2018
@solasdev ,

Thank you very much for discovering and opening this issue! ????????????????

The file in the linked was a great help to tracking down the issue and authoring a
solution.

It seems that the PDF used a fragmented XREF table, which CombinePDF's new XREF
parsing logic (introduced in version 1.0.10 to resolve bug #131) didn't expect.

I updated the logic, tested it and release version 1.0.12 which should solve the
issue. Please update and enjoy the fix.

Thanks again! Please let me know if there are any further issues.

Kindly,
B.

You might also like