Class PdfPrepareSettings
java.lang.Object
se.idsec.signservice.integration.document.pdf.PdfPrepareSettings
- All Implemented Interfaces:
Serializable
Represents the profile settings for how a PDF document is prepared.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder forPdfPrepareSettings
objects. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PdfPrepareSettings
APdfPrepareSettings
with default settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether the prepare PDF functions should flatten PDF acroforms in the document being signed.boolean
Tells if documents with an encryption dictionary should have it removed.boolean
Tells whether a PDF/A consistency check is done when adding a sign page to a document to be signed.void
setAllowFlattenAcroForms
(boolean allowFlattenAcroForms) Assigns whether the prepare PDF functions should flatten PDF acroforms in the document being signed.void
setAllowRemoveEncryptionDictionary
(boolean allowRemoveEncryptionDictionary) Assigns if documents with an encryption dictionary should have it removed.void
setEnforcePdfaConsistency
(boolean enforcePdfaConsistency) Defines if PDF/A consistency check is done when adding a sign page to a document to be signed.
-
Field Details
-
DEFAULT
APdfPrepareSettings
with default settings.
-
-
Constructor Details
-
PdfPrepareSettings
public PdfPrepareSettings()
-
-
Method Details
-
isEnforcePdfaConsistency
public boolean isEnforcePdfaConsistency()Tells whether a PDF/A consistency check is done when adding a sign page to a document to be signed.- Returns:
true
if checks are made, andfalse otherwise
-
setEnforcePdfaConsistency
public void setEnforcePdfaConsistency(boolean enforcePdfaConsistency) Defines if PDF/A consistency check is done when adding a sign page to a document to be signed. If this setting is enabled, and an attempt to add a sign page that is not PDF/A to a PDF/A document an error will be raised. If the setting is not enabled, the document being signed will be reverted into a non-PDF/A document. The default isfalse
.- Parameters:
enforcePdfaConsistency
- whether a PDF/A consistency check is done when adding a sign page to a document to be signed
-
isAllowFlattenAcroForms
public boolean isAllowFlattenAcroForms()Tells whether the prepare PDF functions should flatten PDF acroforms in the document being signed.- Returns:
true
if acroforms should be flattened, andfalse
if the occurence of such a form should lead to an error
-
setAllowFlattenAcroForms
public void setAllowFlattenAcroForms(boolean allowFlattenAcroForms) Assigns whether the prepare PDF functions should flatten PDF acroforms in the document being signed. The default isfalse
.- Parameters:
allowFlattenAcroForms
-true
if acroforms should be flattened, andfalse
if the occurence of such a form should lead to an error
-
isAllowRemoveEncryptionDictionary
public boolean isAllowRemoveEncryptionDictionary()Tells if documents with an encryption dictionary should have it removed.- Returns:
true
if encryption dictionaries should be removed from documents, andfalse
if an error should be reported
-
setAllowRemoveEncryptionDictionary
public void setAllowRemoveEncryptionDictionary(boolean allowRemoveEncryptionDictionary) Assigns if documents with an encryption dictionary should have it removed. The default isfalse
.- Parameters:
allowRemoveEncryptionDictionary
-true
if encryption dictionaries should be removed from documents, andfalse
if an error should be reported
-