Adding "/Type /Info" as an info dictionary entry produces an entry in the info dict whose value is a name(pdf data type). This is invalid (as names are not allows as values within the info dict), and causes some PDF Libraries the throw errors when reading the information. In my case i have an application using the Adobe PDF Library 7.0 that throws an error("Could not create internal representation of XMP metadata") when calling PDDocGetXAPMetadataProperty. When i remove the invalid entry from the info dict, everything works properly. I did look in the svn repository and it appears that the Trunk code should still have the same issue. The following is what i updated in 0.20.5 to work around the issue From org.apache.fop.pdf.PDFInfo public byte[] toPDF() { String p = this.number + " " + this.generation + " obj\n<< /Type /Info\n/Producer (" + this.producer + ") >>\nendobj\n"; try { return p.getBytes(PDFDocument.ENCODING); } catch (UnsupportedEncodingException ue) { return p.getBytes(); } } should be changed to(just removing the "/Type /Info") public byte[] toPDF() { String p = this.number + " " + this.generation + " obj\n<< \n/Producer (" + this.producer + ") >>\nendobj\n"; try { return p.getBytes(PDFDocument.ENCODING); } catch (UnsupportedEncodingException ue) { return p.getBytes(); } } Thanks, john
Bug fixed in FOP Trunk: http://svn.apache.org/viewcvs?rev=388092&view=rev Thank you, John! You are right, of course. Surprising this bug went undetected for so long.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed