Package com.deltaxml.pdfcompare
Interface PDFCompare
public interface PDFCompare
The entry point into the PDF Compare Java API.
Call create() to obtain an instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML Namespace used by the PDF Compare configuration file. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLicenseFile(File licenseFile) Adds the license file for use with Flexera licensing.voidaddLicenseServer(String hostname) Adds a license server (for use with a flexera license server).voidaddLicenseServer(String hostname, int port) Adds a license server and port (for use with a flexera license server).voidaddPDFCompareProgressListener(PDFCompareProgressListener progressListener) Add a progress listener.voidClears all progress listeners.voidCompares the 2 provided input files and produces the result in the provided resultFile file.voidCompares the 2 provided input file paths and produces the result in the provided resultPath file.static PDFComparecreate()Create a newPDFCompareinstance.booleanGets whether the production of debug files is on or not.Get the current prefix used for debug result files.Get theImageConfigurationbeing used by thePDFCompare.Get theResultOptionsbeing used by thePDFCompare.voidremovePDFCompareProgressListener(PDFCompareProgressListener progressListener) Remove a progress listener.voidsetDebugFiles(boolean debug) Sets whether to produce debug files for each filter.voidsetDebugFilesPrefix(String value) Sets what name to use for the folder containing debug files.voidsetImageConfiguration(ImageConfiguration imageConfiguration) Set theImageConfigurationto be used by thePDFCompare.voidsetResultOptions(ResultOptions resultOptions) Set theResultOptionsto be used by thePDFCompare.
-
Field Details
-
PDF_COMPARE_CONFIG_NAMESPACE
XML Namespace used by the PDF Compare configuration file.- See Also:
-
-
Method Details
-
create
Create a newPDFCompareinstance.- Returns:
- the new
PDFCompareinstance.
-
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 aFile.inputB- the second PDF to be used in the comparison given as aFile.resultFile- theFileto 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 aPath.inputB- the second PDF to be used in the comparison given as aPath.resultPath- thePathto 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
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 accessedIOException- if there are problems reading the filecom.deltaxml.licensing.LicenseException- if there is a problem using the license fileSecurityException
-
addLicenseServer
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 addressport- the port number on the license server for the lmgrd- Throws:
IllegalArgumentException- if the port number is out of rangecom.deltaxml.licensing.LicenseException- if there is a problem using the license server
-
addPDFCompareProgressListener
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
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 theImageConfigurationbeing used by thePDFCompare.- Returns:
- the
ImageConfigurationbeing used by thePDFCompare.
-
setImageConfiguration
Set theImageConfigurationto be used by thePDFCompare.- Parameters:
imageConfiguration- anImageConfigurationto be used by thePDFCompare.
-
getResultOptions
ResultOptions getResultOptions()Get theResultOptionsbeing used by thePDFCompare.- Returns:
- the
ResultOptionsbeing used by thePDFCompare.
-
setResultOptions
Set theResultOptionsto be used by thePDFCompare.- Parameters:
resultOptions- anResultOptionsto be used by thePDFCompare.
-