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 Details

    • generateSubtractionImage

      public static 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 DSSDocument generateSubtractionImage(BufferedImage screenshotDoc1, BufferedImage screenshotDoc2, 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(PdfMemoryUsageSetting pdfMemoryUsageSetting)
      It converts generic PdfMemoryUsageSetting to PDF Box domain
      Parameters:
      pdfMemoryUsageSetting - PdfMemoryUsageSetting
      Returns:
      MemoryUsageSetting