[ 
https://issues.apache.org/jira/browse/PDFBOX-1435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735877#comment-13735877
 ] 

Tilman Hausherr edited comment on PDFBOX-1435 at 9/29/13 7:01 AM:
------------------------------------------------------------------

I get an NPE too. The cause is that the point array starts with two !onCurve 
and !endOfContour elements, this results in lastCtrlPoint being null.

Points:
Point(64,-55,,)
Point(44,-48,,)
Point(35,-33,,)
Point(36,-14,,)
Point(52,2,,)
Point(72,2,,)
Point(87,-8,,)
Point(92,-27,,endOfContour)
Point(64,-3,,)
Point(44,-14,,)
Point(44,-36,,)
Point(62,-48,,)
Point(82,-38,,)
Point(83,-15,,endOfContour)

to facilitate debugging, consider adding this in the Point class:

        @Override
        public String toString()
        {
            return String.format ("Point(%d,%d,%s,%s)", x, y, 
onCurve?"onCurve":"", endOfContour?"endOfContour":"");
        }        



was (Author: tilman):
I get an NPE with a different file. The cause is that the point array starts 
with two !onCurve and !endOfContour elements, this results in lastCtrlPoint 
being null.

Points:
Point(736,-116,,)
Point(869,-387,,)
Point(869,-553,onCurve,)
Point(869,-703,,)
Point(821,-797,onCurve,)
Point(745,-945,,)
Point(559,-945,onCurve,)
Point(394,-945,,)
Point(244,-693,,)
Point(244,-515,onCurve,)
Point(244,-344,,)
Point(394,-116,,)
Point(557,-116,onCurve,endOfContour)
Point(771,-1102,,)
Point(1057,-826,,)
Point(1057,-558,onCurve,)
Point(1057,-299,,)
Point(805,39,,)
Point(540,39,onCurve,)
Point(319,39,,)
Point(59,-260,,)
Point(59,-512,onCurve,)
Point(59,-782,,)
Point(333,-1102,,)
Point(564,-1102,onCurve,endOfContour)
Point(558,-1097,onCurve,endOfContour)

to facilitate debugging, consider adding this in the Point class:

        @Override
        public String toString()
        {
            return String.format ("Point(%d,%d,%s,%s)", x, y, 
onCurve?"onCurve":"", endOfContour?"endOfContour":"");
        }        


> text is obscured by the Images
> ------------------------------
>
>                 Key: PDFBOX-1435
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1435
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDFReader
>    Affects Versions: 1.7.1
>            Reporter: huangchangan
>            Assignee: Andreas Lehmkühler
>         Attachments: 12102.pdf, cloud-01.png, pdfbox-1435_12102-01.png, 
> PDFBOX-1435_12102-01.png, PDFBOX-1435.patch, PDFBOX1436-12102_1.png
>
>
> text is obscured by the Images,and Images is showed in reversed color.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to