DOCWRTSVGPAGE

typedef struct _DOCWRTSVGPAGE 
{ 
   DOCWRTPAGE Page; 
   L_HANDLE hSvgHandle; 
   pBITMAPHANDLE pOverlayBitmap; 
   L_DOUBLE dPageWidth; 
   L_DOUBLE dPageHeight; 
   HANNOBJECT hAnnObject; 
} DOCWRTSVGPAGE, * pDOCWRTSVGPAGE; 

The DOCWRTSVGPAGE structure provides information about one SVG page to be added to a document file.

Members

Page

Page structure containing common information about the page to be added.

hSvgHandle

The SVG document representation of the page.

pOverlayBitmap

Pointer to the Bitmap that will be used as an overlay bitmap over the page.

dPageWidth

Custom page width in inches.

dPageHeight

Custom page height in inches.

hAnnObject

LEADTOOLS Annotation container that contains the objects to use when annotating a page in PDF documents.

Comments

hSvgHandle must contain a valid object, it cannot be NULL. This SVG document is used by the L_DocWriterAddPage or L_DocWriterInsertPage functions to create the visual representation of the new page added to the document being created.

The LEADTOOLS Document Writer toolkit will not use the hSvgHandle object after the call to L_DocWriterAddPage or L_DocWriterInsertPage returns. This handle needs to be freed to free the resources associated with it by the user.

SVG documents may or may not have a size. If a document has a size, it is stored in the width and height attributes of the root svg element and can be in any coordinate system. An SVG renderer will typically use this value to determine the final bounding rectangle of the document. SVG documents contain a hierarchy of elements. The final transformation (such as position and size) and style (such as color and fill) may depend on the transformation and style of the parent(s) inside the hierarchy. Calculations have to be done to keep track of this information when converting the SVG file. This procedure is defined by LEADTOOLS as flattening the document.

dPageWidth and dPageHeight can be used to set a custom page size in inches. When the values are the default of 0, the framework will obtain the page width and height automatically from hSvgHandle when the page is added. If it is desired to create pages at a custom size, then simply set the values (in inches) in dPageWidth and dPageHeight before calling L_DocWriterAddPage or L_DocWriterInsertPage.

The LEADTOOLS Document Writer supports creating documents with zero or more empty pages inside them. Use L_DocWriterAddPage or L_DocWriterInsertPage to add an DOCWRTEMPTYPAGE object with the dimension of the empty page set before-hand in dEmptyPageWidth and dEmptyPageHeight and its resolution set to dEmptyPageResolution in the DOCWRTOPTIONS object. As many empty pages as desired can be added in any index desired. To use empty pages, make sure the PageRestriction member is set to DOCWRTPAGERESTRICTION_RELAXED.

Help Version 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.