Leadtools.Forms.DocumentWriters Namespace : DocumentPage Structure |
public struct DocumentPage : System.ValueType
'Declaration Public Structure DocumentPage Inherits System.ValueType
'Usage Dim instance As DocumentPage
public class DocumentPage
JAVASCRIPT_NOSTRUCTS
public value class DocumentPage : public System.ValueType
The DocumentPage structure contains the data for one page to be added to a document file. It is used as a parameter to the DocumentWriter.AddPage method used to add the page.
The DocumentPage.EmfHandle property must contain a valid Windows Enhanced Meta File handle (EMF) that contains the visual representation of the page. This EMF handle can obtained through multiple sources as explained in DocumentWriter.
The DocumentPage.Image property is optional and is used only when the document being created is PDF with the Image/Text overlay option. To create a PDF document with image/text overlay, perform the following steps:
The Dots/Inch (DPI) of the page is the same as the DPI stored in the DocumentPage.EmfHandle property. Therefore, to create a page with 300 DPI, you must add a document page with an EMF that has a DPI of 300 (both horizontally or vertically although the LEADTOOLS Document Writer supports different values for the DPI). If you are using the PDF with image/text feature, you must set the DPI of the Leadtools.RasterImage object to the same DPI as the EMF handle using the RasterImage.XResolution and RasterImage.YResolution properties. To override this behavior and set a custom resolution, set the value of the DocumentOptions.DocumentResolution property to the desired final resolution. This value will be used instead of the resolution of the EMF handle.
The LEADTOOLS Document Writer supports creating documents with zero or more empty pages inside them. Simply add a page with the DocumentPage.EmfHandle property set to the default value of IntPtr.Zero and call the DocumentWriter.AddPage method. The dimension of the empty page must be set before hand in the DocumentOptions.EmptyPageWidth and DocumentOptions.EmptyPageHeight and its resolution set to DocumentOptions.EmptyPageResolution. As many empty pages as desired can be added in any index desired. To use empty pages, make sure the DocumentOptions.PageRestriction property is set to DocumentPageRestriction.Relaxed.
For more information, refer to PdfDocumentOptions.