ISvgDocument Interface (original) (raw)

Summary

Defines an SVG document.

Syntax

C#

Objective-C

C++/CLI

Java

Python

public interface ISvgDocument : IDisposable, ISerializable 
@protocol ISvgDocument <NSObject> 

public interface ISvgDocument extends java.io.Serializable

public interface class ISvgDocument : public System.IDisposable, System.Runtime.Serialization.ISerializable   
class ISvgDocument(IDisposable, ISerializable): 

Example

This example will load a PDF file as SVG and save it to disk

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Core; using Leadtools.ImageProcessing.Color; using Leadtools.Dicom; using Leadtools.Drawing; using Leadtools.Controls; using Leadtools.Svg; public static void SvgDocumentExample() { // The source PDF file string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf"); using (var codecs = new RasterCodecs()) { // Set 300 as the default value for loading document files codecs.Options.RasterizeDocument.Load.Resolution = 300; // get the number of pages int pageCount = codecs.GetTotalPages(srcFileName); for (int pageNumber = 1; pageNumber <= pageCount; pageNumber++) { // Load this page as SVG using default options using (SvgDocument svgDocument = codecs.LoadSvg(srcFileName, pageNumber, null) as SvgDocument) { // Save it to disk string dstFileName = Path.Combine(LEAD_VARS.ImagesDir, string.Format("Page{0}.svg", pageNumber)); svgDocument.SaveToFile(dstFileName, null); } } } } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

Leadtools Assembly

Convert(byte[],int,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],int,int,int,RasterConvertBufferFlags) Method

Convert(byte[],int,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],RasterColor16[],RasterColor16[],int,int,int,RasterConvertBufferFlags) Method

Convert(IntPtr,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],int,int,int,RasterConvertBufferFlags) Method

Convert(IntPtr,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],RasterColor16[],RasterColor16[],int,int,int,RasterConvertBufferFlags) Method