Class NativePdfBoxVisibleSignatureDrawer

java.lang.Object
eu.europa.esig.dss.pdf.pdfbox.visible.AbstractPdfBoxSignatureDrawer
eu.europa.esig.dss.pdf.pdfbox.visible.nativedrawer.NativePdfBoxVisibleSignatureDrawer
All Implemented Interfaces:
PdfBoxSignatureDrawer, eu.europa.esig.dss.pdf.visible.SignatureDrawer, eu.europa.esig.dss.pdf.visible.SignatureFieldBoxBuilder

public class NativePdfBoxVisibleSignatureDrawer extends AbstractPdfBoxSignatureDrawer
The native PDFBox signature drawer. Creates text in the native way.
  • Constructor Details

    • NativePdfBoxVisibleSignatureDrawer

      public NativePdfBoxVisibleSignatureDrawer()
      Default constructor instantiating object with default parameter values
  • Method Details

    • setResourcesHandlerBuilder

      public void setResourcesHandlerBuilder(eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandlerBuilder resourcesHandlerBuilder)
      Sets DSSResourcesFactoryBuilder to be used for a DSSResourcesFactory creation Default : eu.europa.esig.dss.signature.resources.InMemoryResourcesHandler. Works with data in memory.
      Parameters:
      resourcesHandlerBuilder - DSSResourcesHandlerBuilder
    • init

      public void init(eu.europa.esig.dss.pades.SignatureImageParameters parameters, org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions signatureOptions) throws IOException
      Description copied from interface: PdfBoxSignatureDrawer
      Initializes the drawer
      Specified by:
      init in interface PdfBoxSignatureDrawer
      Overrides:
      init in class AbstractPdfBoxSignatureDrawer
      Parameters:
      parameters - SignatureImageParameters
      document - PDDocument
      signatureOptions - SignatureOptions
      Throws:
      IOException - if an exception occurs
    • getDSSFontMetrics

      protected eu.europa.esig.dss.pdf.visible.DSSFontMetrics getDSSFontMetrics()
      Description copied from class: AbstractPdfBoxSignatureDrawer
      Gets the corresponding eu.europa.esig.dss.pdf.visible.DSSFontMetrics
      Specified by:
      getDSSFontMetrics in class AbstractPdfBoxSignatureDrawer
      Returns:
      DSSFontMetrics
    • draw

      public void draw() throws IOException
      Throws:
      IOException
    • getExpectedColorSpaceName

      protected String getExpectedColorSpaceName() throws IOException
      Description copied from class: AbstractPdfBoxSignatureDrawer
      Returns color space name for the provided image
      Specified by:
      getExpectedColorSpaceName in class AbstractPdfBoxSignatureDrawer
      Returns:
      String color space name
      Throws:
      IOException - in case of image reading error