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.
Page structure containing common information about the page to be added.
The SVG document representation of the page.
Pointer to the Bitmap that will be used as an overlay bitmap over the page.
Custom page width in inches.
Custom page height in inches.
LEADTOOLS Annotation container that contains the objects to use when annotating a page in PDF documents.
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document