public ISvgDocument GetPageSvg(
int pageNumber,
CodecsLoadSvgOptions options
)
public ISvgDocument getPageSvg(int pageNumber, CodecsLoadSvgOptions options)
public:
ISvgDocument^ GetPageSvg(
int pageNumber,
CodecsLoadSvgOptions^ options
)
def GetPageSvg(self,pageNumber,options):
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.
The Leadtools.ISvgDocument for the specified page.
For more information refer to RasterCodecs.LoadSvg.
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:\LEADTOOLS23\Resources\Images";
}
import java.io.BufferedWriter;
import java.io.Console;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.Buffer;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.sql.Date;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import javax.xml.validation.Schema;
import org.apache.lucene.store.Directory;
import org.junit.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
import leadtools.barcode.*;
import leadtools.codecs.*;
import leadtools.pdf.*;
import leadtools.svg.*;
public void pdfDocumentGetPageSvgExample() {
String LEAD_VARS_ImagesDir = "C:\\LEADTOOLS23\\Resources\\Images";
String sourceFileName = combine(LEAD_VARS_ImagesDir, "Leadtools.pdf");
String destFileName = combine(LEAD_VARS_ImagesDir, "Leadtools_pdf.svg");
PDFDocument pdfDocument = new PDFDocument(sourceFileName);
SvgDocument svg = (SvgDocument) pdfDocument.getPageSvg(1, null);
svg.saveToFile(destFileName, new SvgSaveOptions());
assertTrue(new File(destFileName).exists());
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.