Error processing SSI file
LEADTOOLS Image File Support (Leadtools.Codecs assembly)

Show in webframe

LoadSvgAsync(ILeadStream,Int32,CodecsLoadSvgOptions) Method








The input stream.
1-based page number to load.
The options used for loading SVG. This can be null.
Loads a page from a stream containing image, document or vector file as SVG
Syntax
public IAsyncOperation<ISvgDocument> LoadSvgAsync( 
   ILeadStream stream,
   int pageNumber,
   CodecsLoadSvgOptions options
)
'Declaration
 
Public Overloads Function LoadSvgAsync( _
   ByVal stream As ILeadStream, _
   ByVal pageNumber As Integer, _
   ByVal options As CodecsLoadSvgOptions _
) As IAsyncOperation(Of ISvgDocument)
'Usage
 
Dim instance As RasterCodecs
Dim stream As ILeadStream
Dim pageNumber As Integer
Dim options As CodecsLoadSvgOptions
Dim value As IAsyncOperation(Of ISvgDocument)
 
value = instance.LoadSvgAsync(stream, pageNumber, options)
public IAsyncOperation<ISvgDocument> LoadSvgAsync( 
   ILeadStream stream,
   int pageNumber,
   CodecsLoadSvgOptions options
)
 function Leadtools.Codecs.RasterCodecs.LoadSvgAsync(ILeadStream,Int32,CodecsLoadSvgOptions)( 
   stream ,
   pageNumber ,
   options 
)
public:
IAsyncOperation<ISvgDocument^>^ LoadSvgAsync( 
   ILeadStream^ stream,
   int pageNumber,
   CodecsLoadSvgOptions^ options
) 

Parameters

stream
The input stream.
pageNumber
1-based page number to load.
options
The options used for loading SVG. This can be null.

Return Value

SVG document representation of the page.
Remarks

Use this method to load a page from any supported image, document or vector file as SVG (Scalable Vector Graphics). The following conditions must be met to load a page from a file as SVG:

Condition Description
The file format is SVG

SVG can be loaded as SVG

The file format is document

Any of the document file formats supported by LEADTOOLS such DOCX/DOC, PPTX/PPT, XLSX/XLS, RTF, TXT, AFP, ICA, etc. These formats will set the CodecsDocumentImageInfo.IsDocumentFile property to true when calling GetInformation

The file format is vector

Any of the vector file formats supported by LEADTOOLS such as DXF, DWG, etc. These formats will set the CodecsVectorImageInfo.IsVectorFile property to true when calling GetInformation

The file format is PDF

And the PDF file contains more than pure raster data (for example, not scanned PDF file).

To find out if an input file can be loaded as SVG, use the CanLoadSvg method.

In addition to the usual format filter assembly (Leadtools.Codecs.*), The following additional assemblies may be required to support loading as SVG

Assembly Description
Leadtools.Svg

SVG support. Always required

Leadtools.Vector

Required if the input document is a vector file

Leadtools.Pdf

Required if the input document is a PDF file

Usually, the returned ISvgDocument is to be casted to Leadtools.Svg.SvgDocument to continue working with the other SVG features, such as retrieving its data, rendering it to a target or saving it to a separate file.

You must check the result SVG document flatness and perform the necessary operation before continuing.

To determine whether a file or stream can be loaded as SVG, use CanLoadSvgAsync.

For more information, refer to Working With SVG.

Requirements

Target Platforms

See Also

Reference

RasterCodecs Class
RasterCodecs Members
Overload List
Leadtools.ISvgDocument
Working With SVG
SVG Size, Bounds and Flat
SVG Rendering

Error processing SSI file