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 classBuilder forPdfPrepareSettingsobjects. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PdfPrepareSettingsAPdfPrepareSettingswith default settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells whether the prepare PDF functions should flatten PDF acroforms in the document being signed.booleanTells if documents with an encryption dictionary should have it removed.booleanTells whether a PDF/A consistency check is done when adding a sign page to a document to be signed.voidsetAllowFlattenAcroForms(boolean allowFlattenAcroForms) Assigns whether the prepare PDF functions should flatten PDF acroforms in the document being signed.voidsetAllowRemoveEncryptionDictionary(boolean allowRemoveEncryptionDictionary) Assigns if documents with an encryption dictionary should have it removed.voidsetEnforcePdfaConsistency(boolean enforcePdfaConsistency) Defines if PDF/A consistency check is done when adding a sign page to a document to be signed.
-
Field Details
-
DEFAULT
APdfPrepareSettingswith 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:
trueif 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:
trueif acroforms should be flattened, andfalseif 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-trueif acroforms should be flattened, andfalseif 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:
trueif encryption dictionaries should be removed from documents, andfalseif 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-trueif encryption dictionaries should be removed from documents, andfalseif an error should be reported
-