Please go to www.dynamicpdf.com to purchase a license for DynamicPDF for Java. You will receive a serial Number and instructions on how to obtain a license Key.
A Developer license key has to be added from your code. To add a license call the com.cete.dynamicpdf.Document.addLicense("Key") method. This is a static method;therefore it can be called from any place,at any time. This needs to be done in only one place in your source code.
Please make sure you have added the license key before starting to use DynamicPDF Generator. In cases where an invalid license has been used or 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.
Please make sure you have added the license key before starting to use DynamicPDF Generator. In cases where an invalid license has been used or 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.
You will need entries in the web.xml to do the servlet entry, servlet mapping and adding of the license keys.
Here are the entries you need for the servlet entry and adding 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>