public class PDFC
extends java.lang.Object
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.
Modifier and Type | Class and Description |
---|---|
class |
PDFC.ComparisonParameters
This class gathers the configuration parameters to run a comparison, except the files to compare.
|
protected static class |
PDFC.PROP
Enum 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
|
Modifier | Constructor and Description |
---|---|
protected |
PDFC(java.io.File original,
java.io.File toCompare,
java.util.Map<PDFC.PROP,java.lang.String> props)
Creates the command line executor
|
Modifier and Type | Method and Description |
---|---|
static void |
activateLicense(java.lang.String activationOrLicenseKey)
This method activates an activation key or a license key.
|
protected PDFComparer |
createComparer()
Applies the parsed properties and creates the comparer
|
static java.lang.String |
getVersion(boolean appendBeta,
boolean appendValidTime)
Returns the current version of PDFC as a String in the format:
MAJOR.MINOR.Build number
|
static void |
main(java.lang.String[] args)
Starts i-net PDFC with the given arguments - either two folders or two files.
|
static void |
requestAndSetTrialLicenseIfRequired()
Deprecated.
As of i-net PDFC 4.3, a trial license will automatically acquired
if possible. If the automatic attempt is not successful, use
activateLicense(String) to activate a license via API. |
protected void |
runComparison()
Runs the comparison or executes the non-comparing command line arguments
|
protected PDFC(java.io.File original, java.io.File toCompare, java.util.Map<PDFC.PROP,java.lang.String> props)
original
- the original / first file to be compared, may be null
toCompare
- the new / second file to be compared, may be null
props
- the additional valid command line properties, may be
null
public static void main(java.lang.String[] args) throws java.util.InvalidPropertiesFormatException
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.
args
- arguments to start PDFC with - either two folders or two files,
and optionally the "-c" and "-i" parameter.java.util.InvalidPropertiesFormatException
- if the configuration file (config.xml) has a wrong formatprotected void runComparison() throws java.util.InvalidPropertiesFormatException
java.util.InvalidPropertiesFormatException
- if the file is not a valid xml configuration file.protected PDFComparer createComparer() throws java.lang.IllegalArgumentException, java.util.InvalidPropertiesFormatException
java.lang.IllegalArgumentException
- if the configuration file does not exist.java.util.InvalidPropertiesFormatException
- if the file is not a valid xml configuration file.public static java.lang.String getVersion(boolean appendBeta, boolean appendValidTime)
appendBeta
- if true
the word "BETA" will be appended in case of a
beta versionappendValidTime
- if true
, the expiration will be appended in case of a
beta version@Deprecated public static final void requestAndSetTrialLicenseIfRequired() throws java.io.IOException, com.inet.pdfc.generator.InvalidLicenseException
activateLicense(String)
to activate a license via API.java.io.IOException
- thrown on connection or encryption errorscom.inet.pdfc.generator.InvalidLicenseException
- thrown in case there already is a purchased but expired license
or, if a trial license was acquired but the trial period is
expiredpublic static final void activateLicense(java.lang.String activationOrLicenseKey) throws java.io.IOException
activationOrLicenseKey
- the activation or license key to be setjava.io.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 invalidCopyright © 2010-2022 by i-net software GmbH