You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Tilman Hausherr <TH...@t-online.de> on 2016/10/02 10:50:17 UTC

Re: How to debug "Expected 'Page' but found COSName{Group}"?

Am 29.09.2016 um 13:34 schrieb Mattias Jiderhamn:
> Hi list.
> I have a PDF (v 1.4) created by "wPDF3 by WPCubed GmbH" 
> (http://www.wptools.de) that when traversed with PDFBox 2.0.3 I get 
> the following exception:
>
> java.lang.IllegalStateException: Expected 'Page' but found COSName{Group}
>     at 
> org.apache.pdfbox.pdmodel.PDPageTree.sanitizeType(PDPageTree.java:227)
>     at 
> org.apache.pdfbox.pdmodel.PDPageTree.access$300(PDPageTree.java:38)
>     at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.next(PDPageTree.java:189)
>     at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.next(PDPageTree.java:153)
>
> I don't know much about the internals of PDF, but the file opens 
> without any issues in Foxit Reader and some online validator claims it 
> is ok. How can I determine if the document is in error or if PDFBox 
> has a problem?
>
> Unfortunately I cannot share the document.
>

It is broken, but some readers can recover from that. From here, it 
looks as if a pointer to a page dictionary points to a group dictionary 
instead.


Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org