Leadtools.Forms.DocumentWriters Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
DocumentPage Structure
See Also  Members  
Leadtools.Forms.DocumentWriters Namespace : DocumentPage Structure



Data for one page to be added to a document file.

Syntax

Visual Basic (Declaration) 
Public Structure DocumentPage 
   Inherits ValueType
Visual Basic (Usage)Copy Code
Dim instance As DocumentPage
C# 
public struct DocumentPage : ValueType 
C++/CLI 
public value class DocumentPage : public ValueType 

Example

For an example, refer to DocumentWriter.

Remarks

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 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.

Inheritance Hierarchy

System.Object
   System.ValueType
      Leadtools.Forms.DocumentWriters.DocumentPage

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Forms.DocumentWriters requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features