Hallo Paulo,
thank you very much, that helped.
Everything is working.
here is my sourcecode so other people have an example if needed.
try {
PdfReader reader = new PdfReader("in.pdf");
HashMap meta = reader.getInfo(); // the original metadata
PdfStamper stp = new PdfStamper(reader, new FileOutputStream("out.pdf"));
meta.put(new String("Subject"),subject);
meta.put(new String("ModDate"),moddate);
meta.put(new String("Author"),author);
meta.put(new String("Keywords"),keywords);
meta.put(new String("Producer"),producer);
meta.put(new String("Title"),title);
meta.put(new String("Creator"),creator);
meta.put(new String("CreationDate"),creationdate);
stp.setMoreInfo(meta);
stp.close();
}
catch (Exception e) {
e.printStackTrace();
}
> See PdfStamper.getMoreInfo() and PdfStamper.setMoreInfo().
>
> Best Regards,
> Paulo Soares
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> > Sent: Tuesday, September 09, 2003 10:03
> > To: [EMAIL PROTECTED]
> > Subject: [iText-questions] add metadata to existing pdf
> >
> > hi.
> > I am using apache fop to create pdf files. but fop can not create meta
> > data like title author.
> > Now I would like to use iText to do that.
> > So fop creates the pdf and itext just adds metadata to existing pdf.
> >
> > Can somebody show me an example on e.g. how to add title to an existing
> > pdf.
> > I know that I probally need to save the pdf as a new pdf, that is ok.
> > I could not find an example yet.
> > Please help me.
> >
> > thank you very much.
> >
> > Phil
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions