Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.6.22
|
Leadtools.Forms.DocumentWriters Namespace > DocumentSvgPage Class : SvgDocument Property |
public ISvgDocument SvgDocument {get; set;}
'Declaration
Public Property SvgDocument As ISvgDocument
'Usage
Dim instance As DocumentSvgPage Dim value As ISvgDocument instance.SvgDocument = value value = instance.SvgDocument
public ISvgDocument SvgDocument {get; set;}
@property (nonatomic, strong) id<ISvgDocument> svgDocument
public ISvgDocument getSvgDocument() public void setSvgDocument(ISvgDocument svgDocument)
<br/>get_SvgDocument();<br/>set_SvgDocument(value);<br/>Object.defineProperty('SvgDocument');
public: property ISvgDocument^ SvgDocument { ISvgDocument^ get(); void set ( ISvgDocument^ value); }
The SvgDocument property must contain a ISvgDocument object --it cannot be null. This SVG document is used in the DocumentWriter.AddPage or DocumentWriter.InsertPage methods to create the visual representation of the new page added to the document being created.
The LEADTOOLS Document Writer toolkit will not use the ISvgDocument object after the call to DocumentWriter.AddPage or DocumentWriter.InsertPage returns. This handle needs to be disposed to free the resources associated with it by the user.
The SVG objects can be obtained from multiple sources as explained in LEADTOOLS Document Writers.
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.
The DocumentSvgPage.Width and DocumentSvgPage.Height properties 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 the ISvgDocument object set in SvgDocument when AddPage is called. If it is desired to create pages at a custom size, then simply set the values (in inches) in DocumentSvgPage.Width and DocumentSvgPage.Height before calling AddPage.
The LEADTOOLS Document Writer supports creating documents with zero or more empty pages inside them. Simply pass a page of type DocumentEmptyPage to DocumentWriter.AddPage or DocumentWriter.InsertPage methods. 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 and in any index desired. To use empty pages, make sure the DocumentOptions.PageRestriction property is set to DocumentPageRestriction.Relaxed.