[Podofo-users] Patch for space character(s) following the stream keyword
A PDF parsing, modification and creation library.
Brought to you by:
domseichter
|
From: Thomas B. <tho...@fo...> - 2020-11-17 16:04:59
|
Hi, I've been experiencing some PDFs which have a space character between the stream keyword and the CR/LF. This causes an error when trying to decode the deflated stream data because the data pointer points to the CR character instead of the actual beginning of the data. I'm attaching two patches. One that will strip any spaces between the stream keyword and another that only strips a single space. Use whichever one you prefer. I know that the PDF Reference states that the stream keyword SHOULD be followed by CR/LF or a singular LF, but I believe we should allow for at least a single space in the interest of compatibility. I've run the PDFs through a few PDF validators and none of them has complained about the extra space. Best Regards, Thomas Barnekov |