You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by jamana ramesh <ra...@gmail.com> on 2011/03/22 16:16:15 UTC

Unknown xobject subtype 'PS'

Hi All,

When I am trying to watermark a pdf with pdfbox1.4.0, I am getting the
following exception. Is there a way to handle this exception and still
continue with watermarking?

java.io.IOException: Unknown xobject subtype 'PS'
      at
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject.createXObject(PDXObject.java:165)
      at
org.apache.pdfbox.pdmodel.PDResources.getXObjects(PDResources.java:157)
      at
org.apache.pdfbox.pdmodel.edit.PDPageContentStream.<init>(PDPageContentStream.java:193)
      at
org.apache.pdfbox.pdmodel.edit.PDPageContentStream.<init>(PDPageContentStream.java:164)
      at test.TestWaterMark.TestWaterMarking(TestWaterMark.java:75)
      at test.TestWaterMark.main(TestWaterMark.java:166)

Thanks in advance,
Ramesh

Re: Unknown xobject subtype 'PS'

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,


Am 22.03.2011 16:16, schrieb jamana ramesh:
> Hi All,
>
> When I am trying to watermark a pdf with pdfbox1.4.0, I am getting the
> following exception. Is there a way to handle this exception and still
> continue with watermarking?
>
> java.io.IOException: Unknown xobject subtype 'PS'
>        at
> org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject.createXObject(PDXObject.java:165)
>        at
> org.apache.pdfbox.pdmodel.PDResources.getXObjects(PDResources.java:157)
>        at
> org.apache.pdfbox.pdmodel.edit.PDPageContentStream.<init>(PDPageContentStream.java:193)
>        at
> org.apache.pdfbox.pdmodel.edit.PDPageContentStream.<init>(PDPageContentStream.java:164)
>        at test.TestWaterMark.TestWaterMarking(TestWaterMark.java:75)
>        at test.TestWaterMark.main(TestWaterMark.java:166)
>
I changed the behaviour of PDFBox in the current trunk version. Instead of 
throwing an exception a log entry will be written. See [1] for further details.

BR
Andreas Lehmkühler

[1] https://issues.apache.org/jira/browse/PDFBOX-987