New Validation Method (v2021 +)

Validate the license key using loadLicense()

Starting in version v2021, Qoppa will send you an xml file that contains your license information and you can use the loadLicense() method to verify your license.

In your Java code, call the loadLicense() method from within your code before making any calls to the library with the full path to the license xml file. The method is static and should be called without instantiating the class first.

// for jOfficeConvert
WordDocument.loadLicense("C:\\MyFolder\\qlicense.xml");
// or
ExcelDocument.loadLicense("C:\\MyFolder\\qlicense.xml");
// or
PowerPointDocument.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFAssemble
PDFAssemble.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFFields
PDFFields.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFImages
PDFImages.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFOptimizer
PDFOptimizer.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFPreflight
PDFPreflight.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFPrint
PDFPrint.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFProcess
PDFDocument.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFSecure
PDFSecure.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFText
PDFText.loadLicense("C:\\MyFolder\\qlicense.xml");
// for jPDFWeb
PDFWeb.loadLicense("C:\\MyFolder\\qlicense.xml");

Your console will output the validation of your license file

  • License is not validated due to incorrect/invalid products
Oct 21, 2021 2:45:39 PM com.qoppa.g.b b
INFO: License Holder: tsan sam testing
INFO: Qoppa Software, LLC - jOfficeConvert v2021R1 - Product not present.
WARNING: No valid products in license file.
  • License is Validated:
Oct 21, 2021 2:29:33 PM com.qoppa.g.b b
INFO: License Holder: tsan sam testing
INFO: Qoppa Software, LLC - jPDFViewer v2021R1 - License Validated

 

Old Validation Method (v2020-)

Validate the license key using getVersion()

// for jOfficeConvert
System.out.println(WordDocument.getVersion());
// or
System.out.println(ExcelDocument.getVersion());
// or
System.out.println(PowerPointDocument.getVersion());
// for jPDFAssemble
System.out.println(PDFAssemble.getVersion());
// for jPDFFields
System.out.println(PDFFields.getVersion());
// for jPDFImages
System.out.println(PDFImages.getVersion());
// for jPDFOptimizer
System.out.println(PDFOptimizer.getVersion());
// for jPDFPreflight
System.out.println(PDFPreflight.getVersion());
// for jPDFPrint
System.out.println(PDFPrint.getVersion());
// for jPDFProcess
System.out.println(PDFDocument.getVersion());
// for jPDFSecure
System.out.println(PDFSecure.getVersion());
// for jPDFText
System.out.println(PDFText.getVersion());
// for jPDFWeb
System.out.println(PDFWeb.getVersion());

If the key is invalid, it will show “Demo version” at the end
Below is an example of invalid license:
jOfficeConvert v2020R2.00 - Demo Version

Below is an example of valid license:
jOfficeConvert v2020R2.00

Validate the license key using command-line

Assuming your license key is 123456 for your Production server, you can validate the key against the jar (i.e, make sure you have the good key for the good version), and your server (i.e make sure you have the good key for your server) by using the command(s)  below.

// jOfficeConvert
java -jar jOfficeConvert.jar -validatekey 123456
// jPDFAssemble
java -jar jPDFAssemble.jar -validatekey 123456
// jPDFImages
java -jar jPDFImages.jar -validatekey 123456
// jPDFOptimizer
java -jar jPDFOptimizer.jar -validatekey 123456
// jPDFProcess
java -jar jPDFProcess.jar -validatekey 123456
// jPDFPrint
java -jar jPDFPrint.jar -validatekey 123456
// jPDFSecure
java -jar jPDFSecure.jar -validatekey 123456
// jPDFText
java -jar jPDFText.jar -validatekey 123456
// jPDFWeb
java -jar jPDFWeb.jar -validatekey 123456

Validate the license key using Java
If the command above validates, but you are still getting watermark when running within your application, you can also validate the key within your Java program inside your environment. Make sure you have jar in the classpath.

// jOfficeConvert
WordDocument.KeyInfoWordConvert.main(new String []{"-validatekey", "123456"});
// jPDFAssemble
PDFAssemble.KeyInfoAssemble.main(new String[]{"-validatekey", "123456"});
// jPDFImages
PDFImages.KeyInfoImages.main(new String[]{"-validatekey", "123456"});
// jPDFOptimizer
PDFOptimizer.KeyInfoOptimizer.main(new String[]{"-validatekey", "123456"});
// jPDFProcess
PDFDocument.KeyInfoProcess.main(new String[]{"-validatekey", "123456"});
// jPDFPrint
PDFPrint.KeyInfoPrint.main(new String[]{"-validatekey", "123456"});
// jPDFSecure
PDFSecure.KeyInfoSecure.main(new String[]{"-validatekey", "123456"});
// jPDFText
PDFText.KeyInfoText.main(new String[]{"-validatekey", "123456"});
// jPDFWeb
PDFWeb.KeyInfoWeb.main(new String[]{"-validatekey", "123456"});

If the key is invalid, the following output will show:

Key Validation: Invalid Key