pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: "About to return NULL from unhandled branch"
Date Sat, 18 Oct 2014 12:16:23 GMT
Hi,

I downloaded the file at the link you gave me (I assume you don't want 
it to become public), and I didn't get the error you mention, I get many 
warnings:

Okt 18, 2014 1:52:00 PM 
org.apache.pdfbox.util.operator.pagedrawer.ClosePath process
WARNUNG: java.awt.geom.IllegalPathStateException: missing initial moveto 
in path definition
java.awt.geom.IllegalPathStateException: missing initial moveto in path 
definition
     at java.awt.geom.Path2D$Float.needRoom(Unknown Source)
     at java.awt.geom.Path2D.closePath(Unknown Source)
     at 
org.apache.pdfbox.util.operator.pagedrawer.ClosePath.process(ClosePath.java:55)
     at 
org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:557)
     at 
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:268)
     at 
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:235)
     at 
org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:215)
     at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:139)
     at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:801)
     at 
org.apache.pdfbox.util.PDFImageWriter.writeImage(PDFImageWriter.java:130)
     at org.apache.pdfbox.PDFToImage.main(PDFToImage.java:226)
     at org.apache.pdfbox.PDFBox.main(PDFBox.java:96)

The reason are sequences like this in the PDF:

708 388.2756347656 m
708 380.2756347656 l
S
h
/F1 8 Tf
0 0 0 rg
BT
31 381.2756347656 Td
9.52 TL
() Tj
T*
ET
h



h = closepath ("connects the end of a subpath back to its starting 
point"). The last "h" doesn't have a starting point.

However the pages are rendered, I tested with 1.8.7, 1.8.6, 1.8.8 and 2.0.

Either you are using a much older version, or you uploaded the wrong file.

Tilman



Am 16.10.2014 um 18:35 schrieb Tilman Hausherr:
> That error is a follow-up error on another error. There was probably a 
> problem with the DCTDecode filter, i.e. a JPEG in the PDF. Please 
> upload the PDF somewhere, as you can't attach it here.
>
> Tilman
>
> Am 16.10.2014 um 14:36 schrieb phiroc@free.fr:
>> Hi,
>>
>> When I run a Java program that uses the PdfBox 1.8.7 API, the 
>> following message appears several times:
>>
>> "About to return NULL from unhandled branch. filter = 
>> COSName{DCTDecode}"
>>
>> Does anyone have any idea what might cause it?
>>
>> Many thanks.
>>
>> Cheers,
>>
>> Philippe
>


Mime
View raw message