java.lang.Object
org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions

public class SignatureOptions extends Object
This contains the visual signature as a COSDocument, its preferred size and the page.
  • Constructor Details

    • SignatureOptions

      public SignatureOptions()
  • Method Details

    • setPage

      public void setPage(int pageNo)
      Set the 1-based page number.
      Parameters:
      pageNo - the page number
    • getPage

      public int getPage()
      Get the 1-based page number.
      Returns:
      the page number
    • setVisualSignature

      public void setVisualSignature(InputStream is) throws IOException
      Reads the visual signature from the given input stream.
      Parameters:
      is - the input stream containing the visual signature
      Throws:
      IOException - when something went wrong during parsing
    • setVisualSignature

      public void setVisualSignature(PDVisibleSigProperties visSignatureProperties) throws IOException
      Reads the visual signature from the given visual signature properties
      Parameters:
      visSignatureProperties - the PDVisibleSigProperties object containing the visual signature
      Throws:
      IOException - when something went wrong during parsing
      Since:
      1.8.3
    • getVisualSignature

      public COSDocument getVisualSignature()
      Get the visual signature.
      Returns:
      the visual signature
    • getPreferedSignatureSize

      public int getPreferedSignatureSize()
      Get the preferred size of the signature.
      Returns:
      the preferred size
    • setPreferedSignatureSize

      public void setPreferedSignatureSize(int size)
      Set the preferred size of the signature.
      Parameters:
      size - the size of the signature
    • close

      public void close() throws IOException
      Closes the visual signature COSDocument, if any.
      Throws:
      IOException - if the document could not be closed