aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at')
-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 99572174..16dfadf4 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
@@ -404,6 +404,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) {