How to get a License
Please go to www.dynamicpdf.com to purchase a license for DynamicPDF™ Merger for Java. You should receive a Serial Number and instructions on how to obtain a License Key.
Adding a Developer License
A Developer license key has to be added from your code. To add a license call com.cete.dynamicpdf.Document.addLicense("Key") method. This is a static method, hence can be called from any place any time. This needs to be done only in one place in your source code.
Please make sure you have added the license key before starting to use DynamicPDF™ Merger. In case of an invalid license or if you have not added the license key before the document.draw() method is called, a DynamicPDF™ logo will be drawn as a watermark on the PDF.
Adding a Server License
A Server license can be added from your code or from an entry in the web.xml file (in case of a web application).- From your code
- To add a license call the com.cete.dynamicpdf.Document.addLicense("Key") method. This is a static method, hence it can be called from any place any time. This needs to be done only in one place in your source code.
Please make sure you have added the license key before starting to use DynamicPDF™ Merger. In case of an invalid license or if you have not added the license key before the document.draw() method is called, a DynamicPDF™ logo will be drawn as a watermark on the PDF.
- From an entry in the web.xml file
- To add the license key using this option, you will have to add the license key to the web.xml file of your web application and then use the DynamicLicenseServlet.class (or compile the same DynamicLicenseServlet.java) that we have provided under the /ceTeSoftware/licensing/ directory. This servlet gets the license key value from the web.xml file and takes care of adding the license.
You will need entries in the web.xml to do the servlet entry, servlet mapping, and addition of the license keys.
Here are the entries you will need for the servlet entry and addition of the license key(s):
<servlet>
<servlet-name>DynamicLicenseServlet</servlet-name>
<servlet-class>DynamicLicenseServlet</servlet-class>
<init-param>
<param-name>LicenseKey1</param-name>
<param-value>YourKey1</param-value>
</init-param>
<init-param>
<param-name>LicenseKey2</param-name>
<param-value>YourKey2</param-value>
</init-param>
<init-param>
<param-name>LicenseKey---N</param-name>
<param-value>YourKey---N</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>For the <servlet-class>, please provide the servlet path where you have placed DynamicLicenseServlet. The <load-on-startup> is a very important node in this case, please make sure that you don't delete it by accident.
You can add multiple keys if you have multiple server licenses and want to use the same web.xml file on all machines; this may be typical in a load-balanced environment. That is why we have shown multiple <init-param> nodes - one for each license key. Please add or remove these nodes as required.
Here are the entries you will need for the servlet mapping:
<servlet-mapping>
<servlet-name>DynamicLicenseServlet</servlet-name>
<url-pattern>/DynamicLicenseServlet</url-pattern>
</servlet-mapping>

