The metadata generated by FOP is broken. They have:
<x:xmpmeta>
instead of:
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-702">
The namespace is not defined and the parser complains about it.
Paulo
________________________________________
From: Stepan RYBAR [EMAIL PROTECTED]
Sent: Tuesday, November 04, 2008 4:11 PM
To: [email protected]
Subject: [iText-questions] iText 2.1.3: Invalid byte 1 of 1-byte UTF-8
sequence Exception while processing PDF from Apache FOP 0.95
Hello,
I am trying to use iText for adding page numbers to the already existed PDF
using PDFStamper class. I have problem. PDFs, which I create using Apache FOP
0.95, cause Exception as shown below, although they look OK in Adobe Acrobat
Reader 8.1.2. I guess, that this is problem of missing or wrong encoding
somewhere (but where?). Attached to this e-mail are: FO source, resulted PDF,
Java code for iText. I am using Sun Java SE 1.6.0_10 on MS Windows 2000.
Please, can You point me, where I am making miskate?
Thank You. Stepan
L:\Documents\Capitol\vypisyKv1\_other>L:\RunFiles\jdk\jre\bin\java -cp ".;iText-
2.1.3.jar" AddPageNumbersToExistingPageNumberPDF
ExceptionConverter: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequ
enceException: Invalid byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unk
nown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown So
urce)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapac
ity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(U
nknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineD
ocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown So
urce)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unk
nown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at com.lowagie.text.xml.xmp.XmpReader.<init>(Unknown Source)
at com.lowagie.text.pdf.PdfStamperImp.close(Unknown Source)
at com.lowagie.text.pdf.PdfStamper.close(Unknown Source)
at AddPageNumbersToExistingPageNumberPDF.main(AddPageNumbersToExistingPa
geNumberPDF.java:30)
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php