>Hi,
>I'm using the iText library to add some form and some javascript to an
>existing pdf (I read the original pdf and I copy everithing in it to
>the new file, adding to it the field and the javascript)
>It works fine, but I don't knok how to get the title, the author, the
>keyword,... from the original pdf.
>Another problem is that I can't copy the hyperlink in the original
>file...
>I use the method described by Bruno Lowagie in the chapter 13 of iText
>tutorial (Chap13_pdfreader.java)
>Can anyone help me?
>Thanks, Valerio
No one had answered this query, and I found the answer so I thought I'd
share:
PdfReader reader = new PdfReader("yourpdf.pdf");
HashMap map= reader.getInfo();
Set keys = map.keySet();
Iterator i = keys.iterator();
while(i.hasNext()) {
String thiskey = (String)i.next();
System.out.println(thiskey + ":" + (String)map.get(thiskey));
}