Document Class |
This class represents a PDF document in the HTML to PDF Converter framework. A Document object can be received as result of one of the render methods described in the Post Convert Customization Overview section. When creating a Document object from an existing PDF document, the existing PDF document is passed to the Document class constructor as the path of the .pdf file on disk or as a stream containing the PDF document binary content. In either case the resulted Document object can be further modified. There are also Document constructors accepting a password when creating a Document object from a password protected PDF document. Here are the Document class constructors:
public Document(Stream pdfStream); public Document(string pdfFileName); public Document(Stream pdfStream, string pdfPassword); public Document(string pdfFileName, string pdfPassword);
The Document class offers access to the PDF pages collection, PDF fonts collection, bookmarks, templates and viewer preferences. For example you can add a new page to the document pages collection using the AddPage method, adding a new font to the fonts collection using the AddFont() method or adding a new template using the AddTemplate() method.