[
https://issues.apache.org/jira/browse/PDFBOX-6282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-6282:
------------------------------------
Affects Version/s: 3.0.8 PDFBox
2.0.37
> EOL marker detection before endstream
> -------------------------------------
>
> Key: PDFBOX-6282
> URL: https://issues.apache.org/jira/browse/PDFBOX-6282
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.37, 3.0.8 PDFBox
> Reporter: Adomas Birštunas
> Priority: Major
> Attachments: veraPDF test suite 6-1-13-t04-pass-a.pdf
>
>
> {color:#000000}PreflightParser detects Error "Body Syntax error, Expected
> 'EOL' before the endstream keyword at offset xxx but found 'c'" for the valid
> PDF file.{color}
>
> {color:#000000}According PDF 1.7 (same as PDF 1.4) section 4.20:{color}
> {color:#000000}"end-of-line marker (EOL marker) - one or two character
> sequence marking the end of a line of text, consisting of a CARRIAGE RETURN
> character (0Dh) or a LINE FEED character (0Ah) or a CARRIAGE RETURN followed
> immediately by a LINE FEED"{color}
>
> {color:#000000}PDF\A-1 section 6.1.7 Stream objects:
> "The *stream* keyword shall be followed either by a CARRIAGE RETURN (0Dh) and
> LINE FEED (0Ah) character sequence or by a single LINE FEED character. The
> *endstream* keyword shall be preceded by an EOL marker."{color}
>
> {color:#000000}Note, that *EOL* may be only single CARRIAGE RETURN (0Dh).
> Requirements for *stream* keyword and *endstream* keyword are
> different.{color}
>
> {color:#000000}Found attached example, having only single CARRIAGE RETURN
> (0Dh) between stream bytes and keyword {*}endstream{*}.{color}
> {color:#000000}It is valid according standards, but Preflight reports an
> error.{color}
>
>
> {{{}{color:#000000}org.apache.pdfbox.preflight.parser{color}.{}}}{color:#000000}{color:#000000}{{PreflightParser}}
> method {{checkEndstreamKeyWord(..)}} should be fixed.{color}{color}
>
>
> {color:#000000}{color:#000000}Currently it expects only single LINE FEED
> character, or CARRIAGE RETURN (0Dh) and LINE FEED (0Ah) character
> sequence.{color}{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]