Interface PdfSignaturePagePreparator
public interface PdfSignaturePagePreparator
Implementation of
ExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionse.idsec.signservice.integration.document.pdf.PreparedPdfDocument
preparePdfDocument
(byte[] pdfDocument, se.idsec.signservice.integration.document.pdf.PdfSignaturePagePreferences signaturePagePreferences, IntegrationServiceConfiguration policyConfiguration, Boolean returnDocumentReference, String callerId) SeeExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
.
-
Method Details
-
preparePdfDocument
se.idsec.signservice.integration.document.pdf.PreparedPdfDocument preparePdfDocument(@Nonnull byte[] pdfDocument, @Nullable se.idsec.signservice.integration.document.pdf.PdfSignaturePagePreferences signaturePagePreferences, @Nonnull IntegrationServiceConfiguration policyConfiguration, @Nullable Boolean returnDocumentReference, @Nullable String callerId) throws se.idsec.signservice.integration.core.error.InputValidationException, se.idsec.signservice.integration.document.pdf.PdfSignaturePageFullException, se.idsec.signservice.integration.document.pdf.PdfAConsistencyCheckException, se.idsec.signservice.integration.document.pdf.PdfContainsAcroformException, se.idsec.signservice.integration.document.pdf.PdfContainsEncryptionDictionaryException, se.idsec.signservice.integration.core.error.SignServiceIntegrationException SeeExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
.- Parameters:
pdfDocument
- the contents of the PDF document that is to be preparedsignaturePagePreferences
- the PDF signature page preferencespolicyConfiguration
- the policy configuration under which this operation is to be executedreturnDocumentReference
- whether to use document referencescallerId
- optional id for the caller- Returns:
- a PreparedPdfDocument object containing the modified PDF document (if a sign page was added) and the VisiblePdfSignatureRequirement telling how a signature image should be added
- Throws:
se.idsec.signservice.integration.core.error.InputValidationException
- for input validation errorsse.idsec.signservice.integration.document.pdf.PdfSignaturePageFullException
- if the PDF document contains more signatures than there is room for in the PDF signature page (andPdfSignaturePagePreferences.isFailWhenSignPageFull()
evaluates to true)se.idsec.signservice.integration.document.pdf.PdfAConsistencyCheckException
- if the policy is configured to enforce PDF/A consistency, and a sign page that is not PDF/A is attempted to be added to a PDF/A documentse.idsec.signservice.integration.document.pdf.PdfContainsAcroformException
- the PDF document contains an Acroform (and policy is not configured to flatten such forms)se.idsec.signservice.integration.document.pdf.PdfContainsEncryptionDictionaryException
- the PDF document contains an encryption dictionay (and policy is not configured to remove these)se.idsec.signservice.integration.core.error.SignServiceIntegrationException
- for other processing errors
-