Changing PDF Producer property with iText

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-07 19:11:04

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!