Class PDFC
Example 1: "java -cp "java/inetcore.jar" com.inet.Start cmd c:\folder1 c:\folder2 -c c:\myconfig.xml"
Compares all PDF files in the two folders which have the same name, using
the configuration file to pre-configure PDFC.
Example 2: "java -cp "java/inetcore.jar" com.inet.Start cmd c:\folder1\report1.pdf
c:\folder2\report1.pdf"
Compares the two PDF files, using the standard configuration settings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis class gathers the configuration parameters to run a comparison, except the files to compare.protected static enumEnum of all known command line switches and options, along with their long and short for and info about their default value and whether they require a parameter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidactivateLicense(String activationOrLicenseKey) This method activates an activation key or a license key.protected PDFComparercreateComparer(boolean setRetryFlag) Applies the parsed properties and creates the comparerstatic StringgetVersion(boolean appendBeta, boolean appendValidTime) Returns the current version of PDFC as a String in the format: MAJOR.MINOR.Build numberstatic voidStarts i-net PDFC with the given arguments - either two folders or two files.protected voidRuns the comparison or executes the non-comparing command line arguments
-
Constructor Details
-
PDFC
Creates the command line executor- Parameters:
original- the original / first file to be compared, may benulltoCompare- the new / second file to be compared, may benullprops- the additional valid command line properties, may benull- Since:
- 3.5
-
-
Method Details
-
main
Starts i-net PDFC with the given arguments - either two folders or two files. Optionally you can set the location of the config.xml with "-c", if you does not use the default config.xml. With the argument "-i" you can specify, that an image with the differences will be created for each page of the PDF files. If the argument "-o" is specified, then an image for each compared page of the PDF files will be created. For request and activate a trial license is the argument -a. If missing a license it get an exit code 2.Example 1: new String[] { "c:\folder1", "c:\folder2", "-c c:\myconfig.xml" }
Compares all PDF files in the two folders which have the same name, using the configuration file to pre-configure PDFC.Example 2: new String[] { "c:\folder1\report1.pdf", "c:\folder2\report1.pdf" }
Compares the two PDF files, using the standard configuration settings.- Parameters:
args- arguments to start PDFC with - either two folders or two files, and optionally the "-c" and "-i" parameter.- Throws:
InvalidPropertiesFormatException- if the configuration file (config.xml) has a wrong format- Since:
- 1.0
-
runComparison
Runs the comparison or executes the non-comparing command line arguments- Throws:
InvalidPropertiesFormatException- if the file is not a valid xml configuration file.- Since:
- 1.0
-
createComparer
protected PDFComparer createComparer(boolean setRetryFlag) throws IllegalArgumentException, InvalidPropertiesFormatException Applies the parsed properties and creates the comparer- Parameters:
setRetryFlag-trueto advice the comparer to set theComparatorProperty.retryOnLowMemoryflag- Returns:
- the configured comparer
- Throws:
IllegalArgumentException- if the configuration file does not exist.InvalidPropertiesFormatException- if the file is not a valid xml configuration file.- Since:
- 1.0
-
getVersion
Returns the current version of PDFC as a String in the format: MAJOR.MINOR.Build number- Parameters:
appendBeta- iftruethe word "BETA" will be appended in case of a beta versionappendValidTime- iftrue, the expiration will be appended in case of a beta version- Returns:
- the current version of PDFC
- Since:
- 1.0
-
activateLicense
This method activates an activation key or a license key. The two types of key have a different purpose:- Activation key:
Can be used on any system to set a license. The activation requires an active Internet connection and will bind the key to the current system. - License key
A license key contains the license data and the system ID of the system it is valid for. So it does not require an Internet connection to activate, but it's only valid on one system.
- Parameters:
activationOrLicenseKey- the activation or license key to be set- Throws:
IOException- thrown if an activation key was passed to the function but the connection to the license server could not be establishedcom.inet.pdfc.generator.InvalidLicenseException- in case the activated license is invalid- Since:
- 4.0
- Activation key:
-