DynamicPDF Generator for Java is a highly efficient class library. From its inception, Generator has focused on creating high quality PDF documents in the most efficient way possible. With this initial focus and years of product maturity, our products are among the fastest on the market. Like any component however the efficiency of the final combined product will depend on the programming practices implemented by the end user. Below are a few areas of consideration for creating the most efficient combined product as possible:
When using the same image in a document multiple times it is important to ensure that the image data is not parsed or included in the document multiple times. Take a look at the Image Reuse topic for details on how to best achieve this.
When using the same TrueType or Type 1 font in a document multiple times it is important to ensure that the font data is not parsed or included in the document multiple times. Take a look at the Open Type Fonts and Type 1 Fonts topic for details on how to best achieve this.
Page Elements are designed so that they can be reused on multiple pages. If you are using a page element as a header, footer or other static element it is best to reuse the same Page Element as opposed to creating a new one for each page. The Group Page Element or Template class can be used to accomplish this easily. Take a look at the Templates topic for details on using templates.
When using DynamicPDF Generator for Java on a web server it is most efficient to use the Document's drawToWeb method. This outputs the PDF straight to the users web browser and eliminates the need for temporary files on the server. Take a look at the Document Output topic for information on the different methods of outputting or saving a PDF document.