Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.1.1
-
Fix Version/s: 4.2.2
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:any
-
Assignee Priority:P2
Description
The PDF in question is actually malformed, I've never seen one that has such a simple but none the less a malformed file. The offending content reads:
q1 0 0 1 0 792 cm
but should read
q 1 0 0 1 0 792 cm
The error is really simple to see but not some simple to fix. I'll have to think a little more about how to fix the error without slowing down our parser too much.
q1 0 0 1 0 792 cm
but should read
q 1 0 0 1 0 792 cm
The error is really simple to see but not some simple to fix. I'll have to think a little more about how to fix the error without slowing down our parser too much.
I have a relatively straight forward fix to the address the malformed PDF content stream. The test checks to see if the content stream token (not a String or a Name) does not contain "d0" or "d1" which are on the only content stream non number tokens that have mixed content. With the a little luck this will be the extent of the corrupt PDF content stream from PDF4NET 2.7.0.3 generator.