PDF Creation Overview
Creating PDFs using DynamicPDF Core Suite for .NET (previously the DynamicPDF Generator for .NET functionality) is straightforward, and the object model can be learned quickly. The three most commonly used classes when creating a new PDF are the Document, Page, and PageElement classes.
- Document class - The Document class represents a PDF document. It has methods for creating and outputting a PDF.
- Page class - The Page class represents a page in a PDF document.
- PageElement class - The PageElement class represents elements, such as text, form fields, graphics, and other elements that can be placed on a Page.
Generating a Document
Generating a basic PDF document generally has a flow as follows.
- Create a Document object.
- Create a Page object.
- Create and add PageElement objects to the page.
- Add the Page object to the document.
- Return to step 2 and repeat until all pages are created.
- Output the PDF document to a file, stream, or IIS's output stream.
PageElements
Many useful page element classes are included with DynamicPDF Core Suite and can be found in the PageElements and BarCoding namespaces. Custom Page Elements can be created by inheriting from the PageElement base class.
Refer to the Custom Page Elements topic for more information.
Also, note that page elements can be reused on different pages using templates. For more information on templates, refer to the Templates topic. There is also a Group object that can logically group Page Elements for reuse on multiple pages.