Xavier Le Vourch wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> dayvidpow wrote:
> |> The easiest way is to put your data as extra keys in the info
> dictionary. If
> |> you want it more "hidden" they can go to the catalog dictionary.
> |
> | Are there any sample / example code as to how to accomplish this?
> |
> 
> I don't think there's any example for that online. To create the custom
> data, use Document.addHeader() as in:
> 
> ~    document.addHeader("key1", "value1");
> 
> 
> To retrieve the meta data, use PdfReader.getInfo(). This will return a
> hash table with all the meta data.
> 
> ~   reader.getInfo().get("key1")
> 
> will return "value1" based on the code sample above.

That's a possible way to do it too.
However, you'll end up with a PDF that has keys in its info
dictionary that aren't explained in the PDF Reference.
I'm always confused when PDF creators do things like that.
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to