aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas')
-rw-r--r--pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java
index 6d035b30..954d4e92 100644
--- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java
+++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java
@@ -399,6 +399,18 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
doc.addSignature(signature, signer, options);
+ // set need to update indirect fields array in acro form
+ COSDictionary trailer = doc.getDocument().getTrailer();
+ COSDictionary troot = (COSDictionary) trailer
+ .getDictionaryObject(COSName.ROOT);
+ COSDictionary acroForm = (COSDictionary) troot
+ .getDictionaryObject(COSName.ACRO_FORM);
+ COSArray tfields = (COSArray) acroForm
+ .getDictionaryObject(COSName.FIELDS);
+ if(!tfields.isDirect()) {
+ tfields.setNeedToBeUpdate(true);
+ }
+
String sigFieldName = signatureProfileSettings.getSignFieldValue();
if (sigFieldName == null) {