Roger Misteli wrote:

Now I have a PDF document that contains PDF Form fields which I want to
fill and flatten and that file contains XMP metadata. I want to remove
that metadata and write my own metadata (using the code above)

If you have a PdfReader, you can ask for its catalog with getCatalog().
If you change this catalog, these changes will be reflected in the PdfStamper that is created with the reader object. (As far as I remember, I could be wrong.)

So you could remove the metadata like this:
catalog.remove(PdfName.METADATA)
or replace it with other metadata:
catalog.put(PdfName.METADATA, ref)

Catalog is a PdfDictionary and internally all the entries are kept in a HashMap.
br,
Bruno


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to