Hello,

I have been working with iText to add and update titles on PDF documents. I have been using the PDFStamper to do this....

PdfReader reader = new PdfReader(originalFilename);
PdfStamper stamper = new PdfStamper(reader,new FileOutputStream (originalFilename, true));
HashMap info = reader.getInfo();                        
info.put("Title", "New Title");
stamper.setMoreInfo(info);
stamper.close();

This actually seems to work fine. However, we are using a search engine to index and search the documents and it doesn't seem to recognize the title that I'm setting using iText. If I look at the PDF Document I can see the old title and my new title in the document. Here is an example....

This is the old title that is still in the PDF document :

2 0 obj
<</Producer(GPL Ghostscript 8.15)
/CreationDate(D:20070321122758)
/ModDate(D:20070321122758)
/Title(Old Title)
/Creator(PScript5.dll Version 5.2.2)
/Author(dmackenzie)>>endobj


and here is the information I set using iText....

304 0 obj<</CreationDate(D:20070413074935)/Title(New Title)/Producer (GPL Ghostscript 8.15)/Author(Joel)/ModDate(D:20070413074935)>>
endobj


Some more interesting facts are that if I use Adobe Reader I see the new title if I look at the document properties, but if I use MAC OS X Preview I actually see the old title.

Any ideas on what I would need to do to resolve this?

Thanks,


Joel Morris

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to