问题
Is it possible to change an existing property of a PDF document with iText?
I tried this
Map<String, String> moreInfo = new HashMap<String, String>();
moreInfo.put(Meta.PRODUCER, "XXX");
moreInfo.put(Meta.AUTHOR, "YYY");
try {
stamp1.setMoreInfo(moreInfo);
}
catch (Throwable t) {
Log.d(this.getClass().getName(), t.getMessage());
}
I don't get any exception, but also nothing changes.
回答1:
That's not possible with the AGPL version of iText. Buying a license will enable you to change that field. See the Why buy a license section here.
来源:https://stackoverflow.com/questions/16963322/changing-pdf-producer-property-with-itext