4

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.

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Stefano Cazzola
  • 1,597
  • 1
  • 20
  • 36
  • Were you able to change the PDF Producer field. I am also getting the same problem. Please suggest. – Karan Apr 01 '16 at 08:16
  • The Author of iText and founder of iText Group Bruno Lowagie answers here https://stackoverflow.com/a/36351733/6584021 for a similar question. – snieguu Aug 09 '21 at 09:13

1 Answers1

5

That's not possible with the AGPL version of iText. Buying a license will enable you to change that field. See AGPL version of iText limitations here.

snieguu
  • 2,073
  • 2
  • 20
  • 39
Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44