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 Type
    Method
    Description
    se.idsec.signservice.integration.document.pdf.PreparedPdfDocument
    preparePdfDocument(byte[] pdfDocument, se.idsec.signservice.integration.document.pdf.PdfSignaturePagePreferences signaturePagePreferences, IntegrationServiceConfiguration policyConfiguration, Boolean returnDocumentReference, String callerId)
    See ExtendedSignServiceIntegrationService.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
      See ExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String).
      Parameters:
      pdfDocument - the contents of the PDF document that is to be prepared
      signaturePagePreferences - the PDF signature page preferences
      policyConfiguration - the policy configuration under which this operation is to be executed
      returnDocumentReference - whether to use document references
      callerId - 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 errors
      se.idsec.signservice.integration.document.pdf.PdfSignaturePageFullException - if the PDF document contains more signatures than there is room for in the PDF signature page (and PdfSignaturePagePreferences.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 document
      se.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