Show / Hide Table of Contents

# Class Convert.SVGOutputOptions

A class containing options for ToSvg functions

##### Inheritance

object
Convert.SVGOutputOptions

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.PDF

###### Assembly: PDFNet.dll

##### Syntax

    public class Convert.SVGOutputOptions

### Constructors

#### SVGOutputOptions()

Creates an SVGOutputOptions object with default settings

##### Declaration

    public SVGOutputOptions()

### Methods

#### SetAnnots(bool)

Control generation of form fields and annotations in SVG.

##### Declaration

    public void SetAnnots(bool annots)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | annots | if false, no form fields or annotations are converted. Default is true.

#### SetCompress(bool)

Compress output SVG files using SVGZ.

##### Declaration

    public void SetCompress(bool svgz)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | svgz | if true, SVG files are written in compressed format. Default is false.

#### SetCreateXmlWrapper(bool)

Create a XML document that contains metadata of the SVG document created.

##### Declaration

    public void SetCreateXmlWrapper(bool xml)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | xml | if true, XML wrapper is created. Default is true.

#### SetDtd(bool)

Set whether the DTD declaration is included in the SVG files.

##### Declaration

    public void SetDtd(bool dtd)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | dtd | if false, no DTD is added to SVG files. Default is true.

#### SetEmbedFonts(bool)

Sets whether to embed fonts into each SVG page file, or to have them shared.

##### Declaration

    public void SetEmbedFonts(bool embed_fonts)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | embed_fonts | if true, fonts are injected into each SVG page. Otherwise they are created as separate files that are shared between SVG pages. Default is false.

#### SetEmbedImages(bool)

Sets whether to embed all images

##### Declaration

    public void SetEmbedImages(bool embed_images)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | embed_images | if true, images will be embeded. Default is false.

#### SetFlattenContent(FlattenFlag)

Flatten images and paths into a single background image overlaid with vector text. This option can be used to improve speed on devices with little processing power such as iPads. Default is e_fast.

##### Declaration

    public void SetFlattenContent(Convert.FlattenFlag flatten)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.FlattenFlag | flatten | select which flattening mode to use.

#### SetFlattenDPI(uint)

The output resolution, from 1 to 1000, in Dots Per Inch (DPI) at which to render elements which cannot be directly converted. Default is 140.

##### Declaration

    public void SetFlattenDPI(uint dpi)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | dpi | the resolution in Dots Per Inch

#### SetFlattenMaximumImagePixels(uint)

Specifies the maximum image size in pixels. Default is 2000000.

##### Declaration

    public void SetFlattenMaximumImagePixels(uint max_pixels)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | max_pixels | the maximum number of pixels an image can have.

#### SetFlattenThreshold(FlattenThresholdFlag)

Used to control how precise or relaxed text flattening is. When some text is preserved (not flattened to image) the visual appearance of the document may be altered.

##### Declaration

    public void SetFlattenThreshold(Convert.FlattenThresholdFlag threshold)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.FlattenThresholdFlag | threshold | the threshold setting to use.

#### SetIndividualCharPlacement(bool)

Some viewers do not support the default text positioning correctly. This option works around this issue to place text correctly, but produces verbose output. This option will override SetRemoveCharPlacement

##### Declaration

    public void SetIndividualCharPlacement(bool individual_char_placement)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | individual_char_placement | if true, text will be positioned correctly

#### SetNoFonts(bool)

Sets whether to disable conversion of font data to SVG

##### Declaration

    public void SetNoFonts(bool no_fonts)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | no_fonts | if true, font data conversion is disabled. Default is false.

#### SetNoUnicode(bool)

Sets whether to disable mapping of text to public Unicode region. Instead text will be converted using a custom encoding

##### Declaration

    public void SetNoUnicode(bool no_unicode)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | no_unicode | if true, mapping of text to public Unicode region is disabled. Default is false.

#### SetOutputThumbnails(bool)

Sets whether per page thumbnails should be included in the file. Default is true.

##### Declaration

    public void SetOutputThumbnails(bool include_thumbs)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | include_thumbs | if true thumbnails will be included

#### SetOverprint(OverprintPreviewMode)

Enable or disable support for overprint and overprint simulation. Overprint is a device dependent feature and the results will vary depending on the output color space and supported colorants (i.e. CMYK, CMYK+spot, RGB, etc). Default is e_op_pdfx_on.

##### Declaration

    public void SetOverprint(PDFRasterizer.OverprintPreviewMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
PDFRasterizer.OverprintPreviewMode | mode | op e_op_on: always enabled; e_op_off: always disabled; e_op_pdfx_on: enabled for PDF/X files only.

#### SetPreserveFontFamilyNames(bool)

Sets whether to use the font/font-family naming scheme as obtained from the source file.

##### Declaration

    public void SetPreserveFontFamilyNames(bool preserve)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | preserve | if true, font family names are preserved. Default is false.

#### SetRemoveCharPlacement(bool)

Sets whether to disable the output of character positions. This will produce slightly smaller output files than the default setting, but many viewers do not support the output correctly

##### Declaration

    public void SetRemoveCharPlacement(bool remove_char_placement)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | remove_char_placement | if true, the output of character positions is disabled

#### SetSvgFonts(bool)

Sets whether to convert all fonts to SVG or not.

##### Declaration

    public void SetSvgFonts(bool svg_fonts)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | svg_fonts | if true, fonts are converted to SVG. Otherwise they are converted to OpenType. Default is false.

#### SetThumbnailSize(uint)

The maximum dimension for thumbnails.

##### Declaration

    public void SetThumbnailSize(uint size)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | size | the maximum dimension (width or height) that thumbnails will have. Default is 400.