Type | Name and description |
---|---|
static boolean |
bCompareAllPages |
static boolean |
bHighlightPdfDifference |
static boolean |
bTrimWhiteSpace |
static CompareModes |
compareMode |
static int |
endPage |
static java.lang.String |
imageDestinationPath |
static java.awt.Color |
imgColor |
static int |
startPage |
static org.apache.pdfbox.text.PDFTextStripper |
stripper |
Type | Name and description |
---|---|
static void |
compareAllPages(boolean flag) To compare all the pages of the PDF files. |
static boolean |
comparePdfFiles(java.lang.String file1, java.lang.String file2, int startPage, int endPage, java.lang.Object excludePattern) This method compare PDF files |
static boolean |
comparepdfFilesWithTextMode(java.lang.String file1, java.lang.String file2, int startPage, int endPage, java.lang.String[] excludePattern) This method compare PDF files with text mode |
static boolean |
createFolder(java.lang.String dir) To create folder |
static void |
createImageDestinationDirectory(java.lang.String file) To create image destination directory |
static CompareModes |
getCompareMode() This method is used to get the current comparison mode text/visual |
static java.lang.String |
getFileName(java.lang.String file) This method gets the file name |
static java.lang.String |
getImageDestinationPath() Path where images are stored when the savePdfAsImage or extractPdfImages methods are invoked. |
static java.lang.String |
getPDFText(java.lang.String file, int startPage, int endPage) This method returns the content of the document |
static void |
highlightPdfDifference(boolean flag) Highlight the difference when 2 pdf files are compared in Binary mode. |
static void |
highlightPdfDifference(java.awt.Color colorCode) Color in which pdf difference can be highlighted. |
static void |
setCompareMode(CompareModes mode) This method is used to change the file comparison mode text/visual |
static void |
setImageDestinationPath(java.lang.String path) Set the path where images to be stored when the savePdfAsImage or extractPdfImages methods are invoked. |
static void |
trimWhiteSpace(boolean flag) getText method by default replaces all the white spaces and compares. |
static void |
updateStartAndEndPages(java.lang.String file, int start, int end) To update the start and end page |
static void |
useStripper(org.apache.pdfbox.text.PDFTextStripper stripper) To modify the text extracting strategy using PDFTextStripper |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
To compare all the pages of the PDF files. By default as soon as a mismatch is found, the method returns false and exits.
flag
- true to enable; false otherwiseThis method compare PDF files
This method compare PDF files with text mode
To create folder
dir
- The path to create the folderTo create image destination directory
file
- the file path from which defines the location of the image directoryThis method is used to get the current comparison mode text/visual
This method gets the file name
Path where images are stored when the savePdfAsImage or extractPdfImages methods are invoked.
This method returns the content of the document
Highlight the difference when 2 pdf files are compared in Binary mode. The result is saved as an image.
flag
- true - enable ; false - disable (default);Color in which pdf difference can be highlighted. MAGENTA is the default color.
colorCode
- color code to highlight the differenceThis method is used to change the file comparison mode text/visual
mode
- CompareModeSet the path where images to be stored when the savePdfAsImage or extractPdfImages methods are invoked.
path
- Absolute path to store the imagesgetText method by default replaces all the white spaces and compares. This method is used to enable/disable the feature.
flag
- true to enable; false otherwiseTo update the start and end page
file
- Absolute file path of the filestart
- the start pageend
- the end pageTo modify the text extracting strategy using PDFTextStripper
stripper
- Stripper with user strategy