[
https://issues.apache.org/jira/browse/PDFBOX-5665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17760272#comment-17760272
]
Michael Klink commented on PDFBOX-5665:
---------------------------------------
{quote}The cause is a comment in a content stream. I doubt that this is legit:
"Any occurrence of the PERCENT SIGN (25h) outside a string or stream introduces
a comment".{quote}
It is valid.
You quote from ISO 32000-1. Already here that was an error as one can see in
some example content streams, e.g. the colored tiling pattern examples.
In ISO 32000-2 that has been changed to
{quote}Any occurrence of the PERCENT SIGN (25h) outside a string or inside a
content stream (see 7.8.2, "Content streams") introduces a comment.{quote}
which isn't that much better as it, strictly speaking, even makes `%`s in
arbitrary binary streams starts of comments. Which is not intended of course.
> NPE when converting pdf to image.
> ---------------------------------
>
> Key: PDFBOX-5665
> URL: https://issues.apache.org/jira/browse/PDFBOX-5665
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.25, 2.0.29, 3.0.0 PDFBox, 4.0.0
> Reporter: Ritu Dubey
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.30, 3.0.1 PDFBox, 4.0.0
>
> Attachments: PDFBOX-5665-2_unc.pdf, test.pdf
>
>
> For attached pdf I am getting a null pointer exception when converting it to
> image. Log attached.
> java.lang.NullPointerException at
> org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:355) at
> org.apache.pdfbox.rendering.PageDrawer.getNonStrokingPaint(PageDrawer.java:747)
> at org.apache.pdfbox.rendering.PageDrawer.fillPath(PageDrawer.java:914) at
> org.apache.pdfbox.rendering.PageDrawer.fillAndStrokePath(PageDrawer.java:1019)
> at
> org.apache.pdfbox.contentstream.operator.graphics.FillNonZeroAndStrokePath.process(FillNonZeroAndStrokePath.java:39)
> at
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:939)
> at
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
> at
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
> at
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)
> at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:282) at
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:355)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]