Interface PDFCompare


public interface PDFCompare

The entry point into the PDF Compare Java API.

Call create() to obtain an instance.

  • Field Details

    • PDF_COMPARE_CONFIG_NAMESPACE

      static final String PDF_COMPARE_CONFIG_NAMESPACE
      XML Namespace used by the PDF Compare configuration file.
      See Also:
  • Method Details

    • create

      static PDFCompare create()
      Create a new PDFCompare instance.
      Returns:
      the new PDFCompare instance.
    • compare

      void compare(File inputA, File inputB, File resultFile) throws IOException, com.deltaxml.licensing.LicenseException, PDFCompareException, FilterException, ComparisonCancelledException
      Compares the 2 provided input files and produces the result in the provided resultFile file.
      Parameters:
      inputA - the first PDF to be used in the comparison given as a File.
      inputB - the second PDF to be used in the comparison given as a File.
      resultFile - the File to be used to contain the HTML side by side PDF report.
      Throws:
      IOException - when unable to read/write files.
      com.deltaxml.licensing.LicenseException - when an error occurs during checking out/in a license.
      PDFCompareException - when an error occurs during PDF Comparison.
      FilterException - when an error occurs whilst compiling, configuring or running XSLT.
      ComparisonCancelledException
    • compare

      void compare(Path inputA, Path inputB, Path resultPath) throws IOException, com.deltaxml.licensing.LicenseException, PDFCompareException, FilterException, ComparisonCancelledException
      Compares the 2 provided input file paths and produces the result in the provided resultPath file.
      Parameters:
      inputA - the first PDF to be used in the comparison given as a Path.
      inputB - the second PDF to be used in the comparison given as a Path.
      resultPath - the Path to be used to contain the HTML side by side PDF report.
      Throws:
      IOException - when unable to read/write files.
      com.deltaxml.licensing.LicenseException - when an error occurs during checking out/in a license.
      PDFCompareException - when an error occurs during PDF Comparison.
      FilterException - when an error occurs whilst compiling, configuring or running XSLT.
      ComparisonCancelledException
    • setDebugFiles

      void setDebugFiles(boolean debug)
      Sets whether to produce debug files for each filter.
      Parameters:
      debug - sets whether to produce debug files for each filter, default is false.
    • getDebugFiles

      boolean getDebugFiles()

      Gets whether the production of debug files is on or not.

      Returns:
      whether the production of debug files is on or not.
      See Also:
    • setDebugFilesPrefix

      void setDebugFilesPrefix(String value)
      Sets what name to use for the folder containing debug files.
      Parameters:
      value - the string name of the folder that contains debug files
    • getDebugFilesPrefix

      String getDebugFilesPrefix()
      Get the current prefix used for debug result files.
      Returns:
      the current prefix used for debug result files.
      See Also:
    • addLicenseFile

      void addLicenseFile(File licenseFile) throws SecurityException, IOException, com.deltaxml.licensing.LicenseException
      Adds the license file for use with Flexera licensing. This can be either simple server/named-user license file or a concurrent license file containing the USE_SERVER directive
      Parameters:
      licenseFile - the FlexLM format license file
      Throws:
      com.deltaxml.licensing.LicenseSecurityException - if the file cannot be accessed
      IOException - if there are problems reading the file
      com.deltaxml.licensing.LicenseException - if there is a problem using the license file
      SecurityException
    • addLicenseServer

      void addLicenseServer(String hostname) throws com.deltaxml.licensing.LicenseException
      Adds a license server (for use with a flexera license server).
      Parameters:
      hostname - of the license server host or its ip address
      Throws:
      com.deltaxml.licensing.LicenseException - if there is a problem using the license server
    • addLicenseServer

      void addLicenseServer(String hostname, int port) throws IllegalArgumentException, com.deltaxml.licensing.LicenseException
      Adds a license server and port (for use with a flexera license server).
      Parameters:
      hostname - of the license server host or its ip address
      port - the port number on the license server for the lmgrd
      Throws:
      IllegalArgumentException - if the port number is out of range
      com.deltaxml.licensing.LicenseException - if there is a problem using the license server
    • addPDFCompareProgressListener

      void addPDFCompareProgressListener(PDFCompareProgressListener progressListener)
      Add a progress listener. This adds a progress listener to the list of registered progress listeners. The same listener may be added more than once.
      Parameters:
      progressListener - the progress listener to add.
    • removePDFCompareProgressListener

      void removePDFCompareProgressListener(PDFCompareProgressListener progressListener)
      Remove a progress listener. This removes a progress listener from the list of registered progress listeners.
      Parameters:
      progressListener - the progress listener to remove.
    • clearPDFCompareProgressListeners

      void clearPDFCompareProgressListeners()
      Clears all progress listeners. This clears all registered progress listeners.
    • getImageConfiguration

      ImageConfiguration getImageConfiguration()
      Get the ImageConfiguration being used by the PDFCompare.
      Returns:
      the ImageConfiguration being used by the PDFCompare.
    • setImageConfiguration

      void setImageConfiguration(ImageConfiguration imageConfiguration)
      Set the ImageConfiguration to be used by the PDFCompare.
      Parameters:
      imageConfiguration - an ImageConfiguration to be used by the PDFCompare.
    • getResultOptions

      ResultOptions getResultOptions()
      Get the ResultOptions being used by the PDFCompare.
      Returns:
      the ResultOptions being used by the PDFCompare.
    • setResultOptions

      void setResultOptions(ResultOptions resultOptions)
      Set the ResultOptions to be used by the PDFCompare.
      Parameters:
      resultOptions - an ResultOptions to be used by the PDFCompare.