←Select platform

GetPageSvg(RasterCodecs,int,CodecsLoadSvgOptions) Method

Summary

Gets a SVG document representation of a page in the PDF file associated with this PDFDocument.

Syntax
C#
VB
C++
Java
Public Overloads Function GetPageSvg( _ 
   ByVal codecs As RasterCodecs, _ 
   ByVal pageNumber As Integer, _ 
   ByVal options As CodecsLoadSvgOptions _ 
) As ISvgDocument 
public ISvgDocument getPageSvg(RasterCodecs codecs, int pageNumber, CodecsLoadSvgOptions options) 

Parameters

codecs
An optional Leadtools.Codecs.RasterCodecs to use when reading the page. If you pass a null reference, then this method will internally create a new Leadtools.Codecs.RasterCodecs object and dispose of it before returning.

pageNumber
The 1-based page number to read. Must be greater than or equal to 1 and less than or equal to the total number of pages in the document (Pages.Count). Use the special value of -1 to indicate a reference to the last page of the document.

options
Options to use when loading the SVG.

Return Value

An Leadtools.ISvgDocument that represents the requested page.

Remarks

This method does not perform anything beyond simply using the Leadtools.Codecs.RasterCodecs object passed (or the temporary one created) to load the PDF page:

rasterCodecsObject.LoadSvg(document.FileName, pageNumber, options)

For more information, refer to RasterCodecs.LoadSvg.

Once the page is obtained as a Leadtools.ISvgDocument object, you can use this object to perform any other image functionality with LEADTOOLS, such as setting it into a viewer control, extracting text, saving to other formats, etc.

Since a Leadtools.Codecs.RasterCodecs object is required by this method, you can either pass one through the codecs parameter and the method will use this object to load the page. This is helpful if you need to change the default Leadtools.Codecs.RasterCodecs load options or subscribe to any of the events that will occur during loading. If none of that is required, you can simply pass null for the codecs parameter and this method will internally create, use and dispose a temporary Leadtools.Codecs.RasterCodecs object.

To get a raster image of any page in a PDF document, use GetPageImage.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly