Class PdfBoxUtils

java.lang.Object
eu.europa.esig.dss.pdf.pdfbox.PdfBoxUtils

public final class PdfBoxUtils extends Object
Contains a set of utils for PdfBox implementation
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary
    createSignatureAppearanceDictionary(org.apache.pdfbox.pdmodel.PDDocument pdDocument, org.apache.pdfbox.pdmodel.common.PDRectangle pdRectangle)
    This method creates a generic Appearance dictionary, containing a Normal Appearance
    static eu.europa.esig.dss.model.DSSDocument
    generateSubtractionImage(BufferedImage screenshotDoc1, BufferedImage screenshotDoc2)
    This method returns an image representing a subtraction result between screenshotDoc1 and screenshotDoc2.
    static eu.europa.esig.dss.model.DSSDocument
    generateSubtractionImage(BufferedImage screenshotDoc1, BufferedImage screenshotDoc2, eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandler dssResourcesHandler)
    This method returns an image representing a subtraction result between screenshotDoc1 and screenshotDoc2.
    static org.apache.pdfbox.io.MemoryUsageSetting
    getMemoryUsageSetting(eu.europa.esig.dss.pdf.PdfMemoryUsageSetting pdfMemoryUsageSetting)
    It converts generic PdfMemoryUsageSetting to PDF Box domain

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • generateSubtractionImage

      public static eu.europa.esig.dss.model.DSSDocument generateSubtractionImage(BufferedImage screenshotDoc1, BufferedImage screenshotDoc2)
      This method returns an image representing a subtraction result between screenshotDoc1 and screenshotDoc2. This method uses a default in-memory DSSResourcesHandler
      Parameters:
      screenshotDoc1 - BufferedImage the first screenshot to compare
      screenshotDoc2 - BufferedImage the second screenshot to compare with
      Returns:
      DSSDocument subtraction result
    • generateSubtractionImage

      public static eu.europa.esig.dss.model.DSSDocument generateSubtractionImage(BufferedImage screenshotDoc1, BufferedImage screenshotDoc2, eu.europa.esig.dss.spi.signature.resources.DSSResourcesHandler dssResourcesHandler)
      This method returns an image representing a subtraction result between screenshotDoc1 and screenshotDoc2. This method uses a provided DSSResourcesHandler.
      Parameters:
      screenshotDoc1 - BufferedImage the first screenshot to compare
      screenshotDoc2 - BufferedImage the second screenshot to compare with
      dssResourcesHandler - DSSResourcesHandler to be used
      Returns:
      DSSDocument subtraction result
    • createSignatureAppearanceDictionary

      public static org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary createSignatureAppearanceDictionary(org.apache.pdfbox.pdmodel.PDDocument pdDocument, org.apache.pdfbox.pdmodel.common.PDRectangle pdRectangle)
      This method creates a generic Appearance dictionary, containing a Normal Appearance
      Parameters:
      pdDocument - PDDocument to create a new Appearance dictionary in
      pdRectangle - PDRectangle used for annotation dictionary
      Returns:
      PDAppearanceDictionary
    • getMemoryUsageSetting

      public static org.apache.pdfbox.io.MemoryUsageSetting getMemoryUsageSetting(eu.europa.esig.dss.pdf.PdfMemoryUsageSetting pdfMemoryUsageSetting)
      It converts generic PdfMemoryUsageSetting to PDF Box domain
      Parameters:
      pdfMemoryUsageSetting - PdfMemoryUsageSetting
      Returns:
      MemoryUsageSetting