Class PdfComparer

java.lang.Object
com.priint.pubserver.util.PdfComparer

public class PdfComparer extends Object
Utility class with static methods to compare pdf files
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    compare(String pdf1, String pdf2)
    Method to compare two pdf files with default resolution in dpi = 300
    static boolean
    compare(String pdf1, String pdf2, float resolutionInDpi)
    Method to compare two pdf files
    static boolean
    compare(String pdf1, String pdf2, float resolutionInDpi, int x, int y, int width, int height)
    Method to compare two pdf files
    static boolean
    compare(String pdf1, String pdf2, int x, int y, int width, int height)
    Method to compare two pdf files with default resolution in dpi = 300

    Methods inherited from class java.lang.Object

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

    • compare

      public static boolean compare(String pdf1, String pdf2, float resolutionInDpi, int x, int y, int width, int height) throws IOException
      Method to compare two pdf files
      Parameters:
      pdf1 - string pdf file path
      pdf2 - string pdf file path
      resolutionInDpi - float between 96 and 1000
      x - int startX
      y - int startY
      width - width (value 1 meaning use max possible size)
      height - height (value 1 meaning use max possible size)
      Returns:
      return true if pdf files are equal
      Throws:
      IOException
    • compare

      public static boolean compare(String pdf1, String pdf2) throws IOException
      Method to compare two pdf files with default resolution in dpi = 300
      Parameters:
      pdf1 - the first pdf file path
      pdf2 - the second pdf file path
      Returns:
      return true if pdf files are equal
      Throws:
      IOException
    • compare

      public static boolean compare(String pdf1, String pdf2, float resolutionInDpi) throws IOException
      Method to compare two pdf files
      Parameters:
      pdf1 - the first pdf file path
      pdf2 - the second pdf file path
      resolutionInDpi - float between 96 and 1000
      Returns:
      return true if pdf files are equal
      Throws:
      IOException
    • compare

      public static boolean compare(String pdf1, String pdf2, int x, int y, int width, int height) throws IOException
      Method to compare two pdf files with default resolution in dpi = 300
      Parameters:
      pdf1 - the first pdf file path
      pdf2 - the second pdf file path
      x - int startX
      y - int startY
      width - width (value 1 meaning use max possible size)
      height - height (value 1 meaning use max possible size)
      Returns:
      return true if pdf files are equal
      Throws:
      IOException