Leadtools.Documents Namespace : DocumentGetSvgOptions Enumeration |
Leadtools.Documents.DocumentGetSvgOptions = function() { };
Leadtools.Documents.DocumentGetSvgOptions.prototype = {
none = 0,
allowPolylineText = 1,
dropImages = 2,
dropShapes = 4,
dropText = 8,
forConversion = 16,
ignoreXmlParsingErrors = 32,
};
Value | Member | Description |
---|---|---|
0 | none | Default. Get the SVG as is. |
1 | allowPolylineText | Allow replacing text with polyline shapes in the created SVG.
Some file filters may replace some or all text elements with a polyline representation to better represent the final shape. This behavior may be desired if the goal is to create an SVG document that can be viewed regardless on whether some or all of the fonts specified in the document are present in the system. |
2 | dropImages | Drop the image elements of the SVG during load. |
4 | dropShapes | Drop any element that is not text or image during load. |
8 | dropText | Drop the text elements of the SVG during load. |
16 | forConversion | The created SVG should be optimized for conversion.
When ForConversion is not used, the engine might massage some of the elements for view optimization by using correction transformation matrices. This is the default behavior and is the most recommended when loading a document as SVG for viewing purposing since it generates the most natural flow of the document elements (especially text). When ForConversion is used, this behavior is not used and the elements are loaded as is. This is used when this SVG document is used for conversion purposes. LEADTOOLS Document Viewer loads SVG documents without ForConversion since the framework is viewing the SVG. LEADTOOLS Document Converters loads SVG document with ForConversion since the framework is using the SVG for conversion from one format to another and is never viewed. |
32 | ignoreXmlParsingErrors | The engine will should should relax the XML parsing rules and try to ignore insignificant errors in the XML data if possible. For example, tags that are not closed and elements or attributes that do not adhere to the SVG standard specification. |
Creating an SVG document with text only is desired in certain scenarios. For example, if the application loads SVG document to parse the text values and store them in an external database for text search purposes, then using DropImages and DropShapes will speed up the loading operation and elements not required will be discarded. This is especially useful if the original SVG document contains image elements which may use a lot of memory and disk space.