DynamicPDF Core Suite for .NET is a highly efficient class library. From its inception, Core Suite 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 parse or included in the document multiple times. Review the Image Reuse topic for details on how to best achieve image reuse.
When using the same OpenType or Type 1 font in a document multiple times it is important to ensure that the font data is not parse or included in the document multiple times. Take a look at the OpenType Fonts and Type 1 Fonts topic for details on how to best achieve font reuse.
Page Element Reuse
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 Core Suite for .NET 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.
When large PDF files are being created and memory usage needs to be conserved consider using Disk Buffering. Disk buffering is turn off by default and therefore the entire PDF is stored in Memory until it is all ready to be drawn to disk. Leaving Disk Buffering off is the most efficient way of creating the PDF (as you are not introducing the overhead of drawing back and forth to disk) sometimes memory usage my dictate the need for more control.