Bruno,
The offending lines are:
com.lowagie.text.pdf.PdfName len =
new com.lowagie.text.pdf.PdfName(String.valueOf(meta.length));
stream.put(com.lowagie.text.pdf.PdfName.LENGTH, len);
What is wrong here? If I take these lines out, everything is fine.
-----Original Message-----
From: bruno [mailto:[EMAIL PROTECTED]
Sent: Friday, March 03, 2006 2:39 AM
To: Segev, Eli
Cc: [email protected]
Subject: Re: Copying a PDF File
Segev, Eli wrote:
>I have some code that I wrote to learn how to use iText. The code
>copies one file to another file. I copy pages and metadata. For some
>reason adding metadata corrupts the file. The original file was
created
>with Adobe Illustrator. Without writing the metadata, AI can open the
>copied file. If I add the metadata, AI says: "Adcrobat PDF File Format
>is having difficulties. Expected a number object". Yet, Acrobat
Reader
>has no problem opening the file.
>
Of course Acrobat Reader has no problems with it:
iText is producing a valid PDF (in accordance with the PDF Reference).
The problem you have is that a PDF generated with Adobe Illustrator
sometimes contains/expects extra information. You could say AI produces
PDF in accordance with a specific subset of the PDF Reference.
If you add stuff to the PDF that is valid PDF but that falls outside
the AI specific subset, AI can have troubles reading that PDF.
br,
Bruno
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions