Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Beginners

Topic: Setting PDF meta properties, 2 Attachments
Conf: (P-PDF) Beginners, Msg: 156933
From: nasir-techno
Date: 12/16/2006 01:04 AM

i want to add pdf meta properties to existing pdf files ussing itext library. when i do this using following code

Document document = new Document();
FileOutputStream fos = new FileOutputStream("Meta.pdf");
PdfWriter.getInstance(document, fos);
document.addTitle("my title");
document.addSubject("my subject.");
document.addKeywords("iText, Hello World, step 3");
document.addCreator("My program using iText");
document.add(new Paragraph("Hello World"));

it adds this meta information in document surmmary (i.e. File Menu -> Document Properties -> Summary). [see the image attached (doc_summary.jpg)]

I want to enter the same information through script using java+itext in pdf file propertes (i.e. right click pdf -> properties -> pdf properties tab). [see the image attached (doc_properties.jpg)]

please let me know what is the appropriate way for doing that. sample code will be bonus for me.

document summarypdf properties