0

I'm trying to stamp a seal on a pdf with pdftk. I run:

pdftk original.pdf stamp seal.pdf output sealed.pdf

But it gets this just with a specific pdf:

Unhandled Java Exception:
gnu.xml.dom.ls.DomLSException: unbound element prefix: "xmp"
   at gnu.xml.dom.ls.DomLSParser.doParse(libgcj.so.10)
   at gnu.xml.dom.ls.DomLSParser.parse(libgcj.so.10)
   at gnu.xml.dom.DomDocumentBuilder.parse(libgcj.so.10)
   at com.lowagie.text.xml.xmp.XmpReader.<init>(itext-2.1.7.jar.so)
   at com.lowagie.text.pdf.PdfStamperImp.close(itext-2.1.7.jar.so)
Caused by: org.xml.sax.SAXParseException: unbound element prefix: "xmp"
   at gnu.xml.stream.SAXParser.parse(libgcj.so.10)
   at gnu.xml.dom.ls.DomLSParser.doParse(libgcj.so.10)
   ...4 more
Caused by: javax.xml.stream.XMLStreamException: unbound element prefix: "xmp"
   at gnu.xml.stream.XMLParser.error(libgcj.so.10)
   at gnu.xml.stream.XMLParser.readStartElement(libgcj.so.10)
   at gnu.xml.stream.XMLParser.next(libgcj.so.10)
   at gnu.xml.stream.SAXParser.parse(libgcj.so.10)
   ...5 more

I tried with other pdf and they work. I tried in other development server and there it works. In both servers I have same version of pdftk and java.

Can anyone help me?

Thanks!

josebailo
  • 138
  • 1
  • 7

1 Answers1

0

This is an error in PDF file and pdftk unable to fix it. In Ubuntu you can just open PDF and print it into PDF, it must fix the bug. Then you can change layouts using PDFedit.

ipadm
  • 31
  • 1
  • 4