title: PDFStamper fails on several PDF files (itext 5.5.1)
body: <p>I'm trying to fill PDF forms with data and got PDFStamper (itext version 5.5.1) to work with several PDF files, but on some it always fails. Sample code:</p>
  
  <pre><code>PdfReader reader = new PdfReader(new FileInputStream("C:/Temp/source.pdf"));
  PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("C:/Temp/temp.pdf"));
  stamper.close();
  </code></pre>
  
  <p>Two different error messages until now, first one:</p>
  
  <pre><code>Exception in thread "main" java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
      at com.itextpdf.xmp.impl.XMPMetaParser.createDocumentBuilderFactory(XMPMetaParser.java:423)
      at com.itextpdf.xmp.impl.XMPMetaParser.&lt;clinit&gt;(XMPMetaParser.java:71)
      at com.itextpdf.xmp.XMPMetaFactory.parseFromBuffer(XMPMetaFactory.java:167)
      at com.itextpdf.xmp.XMPMetaFactory.parseFromBuffer(XMPMetaFactory.java:153)
      at com.itextpdf.text.pdf.PdfStamperImp.close(PdfStamperImp.java:337)
      at com.itextpdf.text.pdf.PdfStamper.close(PdfStamper.java:208)
  </code></pre>
  
  <p>Second:</p>
  
  <pre><code>java.lang.reflect.InvocationTargetException
  [...]
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.itextpdf.xmp.impl.XMPMetaParser
      at com.itextpdf.xmp.XMPMetaFactory.parseFromBuffer(XMPMetaFactory.java:167)
      at com.itextpdf.xmp.XMPMetaFactory.parseFromBuffer(XMPMetaFactory.java:153)
      at com.itextpdf.text.pdf.PdfStamperImp.close(PdfStamperImp.java:337)
      at com.itextpdf.text.pdf.PdfStamper.close(PdfStamper.java:208)
  </code></pre>
  
  <p>The error messages vary, maybe because of different environments (full application vs. test class, but both using itext-5.5.1.jar).</p>
  
  <p>One of the working PDF form was created using OpenOffice Writer, which produced a version 1.4 (Acrobat 5.x) document. The failing PDF form was created using Acrobat Distiller 7.0.5, pdf version 1.6 (Acrobat 7.x). I already tried to convert it down to version 1.4/5.x without luck.</p>
  
  <p>Any ideas?</p>