←Select platform

GetPageSvg(int,CodecsLoadSvgOptions) Method

Summary
Gets an SVG document representation of a page in the PDF file associated with this PDFDocument.
Syntax
C#
VB
C++
Java
Public Overloads Function GetPageSvg( _ 
   ByVal pageNumber As Integer, _ 
   ByVal options As CodecsLoadSvgOptions _ 
) As ISvgDocument 
public ISvgDocument getPageSvg(int pageNumber, CodecsLoadSvgOptions options) 

Parameters

pageNumber
1-based number of the page.

options
Options to use when converting the PDF data to SVG. This parameter can be null to use the default options.

Return Value

The Leadtools.ISvgDocument for the specified page.

Remarks

For more information refer to RasterCodecs.LoadSvg.

Example
C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Pdf; 
using Leadtools.Svg; 
using Leadtools.WinForms; 
 
 
public void PDFDocumentGetPageSvgExample() 
{ 
   string sourceFileName = Path.Combine(LEAD_VARS.ImagesDir, @"Leadtools.pdf"); 
 
   PDFDocument pdfDocument = new PDFDocument(sourceFileName); 
 
   ImageViewer imageViewer = new Leadtools.Controls.ImageViewer(); 
   imageViewer.ImageBackgroundColor = System.Drawing.Color.White; 
   imageViewer.Location = new System.Drawing.Point(10, 10); 
   imageViewer.Dock = DockStyle.Fill; 
 
   imageViewer.SvgDocument = pdfDocument.GetPageSvg(1, null) as SvgDocument; 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS21\Resources\Images"; 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.Controls 
Imports Leadtools.Pdf 
Imports Leadtools.Svg 
Imports Leadtools.WinForms 
 
Public Sub PDFDocumentGetPageSvgExample() 
   Dim sourceFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf") 
 
   Dim pdfDocument As PDFDocument = New PDFDocument(sourceFileName) 
 
   Dim imageViewer As ImageViewer = New Global.Leadtools.Controls.ImageViewer() 
   imageViewer.ImageBackgroundColor = System.Drawing.Color.White 
   imageViewer.Location = New System.Drawing.Point(10, 10) 
   imageViewer.Dock = DockStyle.Fill 
 
   imageViewer.SvgDocument = TryCast(pdfDocument.GetPageSvg(1, Nothing), SvgDocument) 
End Sub 
 
Public NotInheritable Class LEAD_VARS 
   Public Const ImagesDir As String = "C:\LEADTOOLS21\Resources\Images" 
End Class 
Requirements

Target Platforms

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

Leadtools.Pdf Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.