Matt's thread was about the xml metadata not the metadata that goes into the
Info dictionary. Use something like this:

PdfReader reader = new PdfReader("my original.pdf");
HashMap meta = reader.getInfo(); // the original metadata
PdfStamper stp = new PdfStamper(reader, new FileOutputStream("my
modification.pdf"));
// change meta to suit your needs.
stp.setMoreInfo(meta); // check the javadoc! It's not a replacement.
stp.close();


Best Regards,
Paulo Soares


> -----Original Message-----
> From: Kishore Subramanian [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, March 19, 2003 1:55
> To:   '[EMAIL PROTECTED]'
> Subject:      [iText-questions] Modifying Metadata
> 
> Hi,
>  
> Iam facing a problem where I need to modify the metadata (for instance,
> the "Keywords") of an existing PDF file without making any other
> modifications to this PDF file. I need to do this in Java. 
>  
> I found the iText API very intuitive to set the meta data on a new PDF
> file. But I was not able to find a way to perform the same on an existing
> PDF file. I saw a thread in this mailing list (from Matt).
>  
> Can someone pls explain how I can do this with iText (.97 version) ? Any
> help (sample code) will be greatly appreciated.
> 
> Thanks, 
> 
> Kishore Subramanian 
> Agile Software 
> 
>  


-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to