Bertrand Beyssac wrote:

Is It possible with iText to create an invisible markup on each page ?

After a PDF file concat, i want to identify on each page by a java program with iText, the name of the source file.

There may be different solutions to achieve this,
but my first thought would be to add a hidden (= invisible) annotation.
(I'm not sure what type of annotation would be the best choice;
maybe Paulo or Leonard can help you out on this one.)

Afterwards, you can read the document with PdfReader
and get the PdfDictionary of each page with getPageN(pagenumber);
This page dictionary has a series of key-value pairs.
One of the keys is 'Annots'. I think you can get it like this:
PdfDictionary page = reader.getPageN(1);
PdfArray annots = (PdfArray)getPdfObject(page.get(PdfName.ANNOTS));
if (annots != null) {
 ArrayList list = annots.getArrayList();
 // do stuff with this list
}

br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to