Error processing SSI file
LEADTOOLS Leadtools.Documents (Leadtools.Documents assembly)

GetSvgElement Method

Show in webframe
The options to use when loading the SVG for the page.
An optional ImageLoader instance to use instead of the internally-created one.
Gets an SVG document for this page with the specified options.
Syntax
 function Leadtools.Documents.DocumentPage.getSvgElement( 
   options ,
   imageLoader 
)

Parameters

ParameterTypeDescription
optionsDocumentGetSvgOptionsThe options to use when loading the SVG for the page.
imageLoaderImageLoaderAn optional ImageLoader instance to use instead of the internally-created one.

Return Value

TypeDescription
jQueryApi.IDeferred A Promise object that may resolve succesfully to an HTML or SVG Element. If IsSvgSupported is false, the request will fail.
Remarks

To only get the URL instead of loading the image, see GetSvgUrl.

Not all document types support this method; if IsSvgSupported is false, an error will be returned from the service.

The options parameter controls how the SVG document is generated. Since images embedded in the SVG may contain large embedded Base64 data, the DropImages option can be used to remove those images. The result SVG document will only contain the text and vector shapes and will have a small memory footprint. Then, GetSvgBackImageElement can be called to return a raster image that contains the dropped image elements separately. This strategy is employed in the LEADTOOLS Document Viewer.

If the value of ImageScale is a value greater than 1, then the result SVG document will have a size that is equal to Size / ImageScale.

The LEADTOOLS Document Viewer uses this method to obtain the SVG document for the page when the view mode is "SVG". The LEADTOOLS Document Converter uses this method to obtain the SVG document for the page when converting without using OCR.

This method takes an optional imageLoader parameter for additional image load configuration. If an ImageLoader is provided, Run will not be called and it is the responsibility of the application to call it when needed. If an ImageLoader is not supplied, one is created internally and Run is called before this method exits. See Documents Image Loading for more information.

This request can pass arbitrary user data through ServiceUserData.

Refer to Image Loading Using LEADTOOLS Documents Library and Document Loading Using LEADTOOLS Documents Library for more information.

Example
Refer to GetImageElement for an example.
See Also

Reference

DocumentPage Object
DocumentPage Members

Error processing SSI file