You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Mattias Jiderhamn <mj...@expertsystems.se> on 2016/09/29 11:34:05 UTC
How to debug "Expected 'Page' but found COSName{Group}"?
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.
--
</Mattias>
Re: How to debug "Expected 'Page' but found COSName{Group}"?
Posted by Tilman Hausherr <TH...@t-online.de>.
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