public static class

Convert.SVGOutputOptions

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.Convert.SVGOutputOptions

Class Overview

A class containing options for ToSvg functions

Summary

Constants
int e_op_off
int e_op_on
int e_op_pdfx_on
Public Constructors
SVGOutputOptions()
Creates an SVGOutputOptions object with default settings
Public Methods
void setAnnots(boolean annots)
Control generation of form fields and annotations in SVG.
void setCompress(boolean svgz)
Compress output SVG files using SVGZ.
void setCreateXmlWrapper(boolean xml)
Create a XML document that contains metadata of the SVG document created.
void setDtd(boolean dtd)
Set whether the DTD declaration is included in the SVG files.
void setEmbedFonts(boolean embed_fonts)
Sets whether to embed fonts into each SVG page file, or to have them shared.
void setEmbedImages(boolean embed_images)
Sets whether to embed all images
void setFlattenContent(int flatten)
Flatten images and paths into a single background image overlaid with vector text.
void setFlattenThreshold(int threshold)
Used to control how precise or relaxed text flattening is.
void setIndividualCharPlacement(boolean individual_char_placement)
Some viewers do not support the default text positioning correctly.
void setNoFonts(boolean no_fonts)
Sets whether to disable conversion of font data to SVG
void setNoUnicode(boolean no_unicode)
Sets whether to disable mapping of text to public Unicode region.
void setOutputThumbnails(boolean include_thumbs)
Sets whether per page thumbnails should be included in the file.
void setOverprint(int mode)
Enable or disable support for overprint and overprint simulation.
void setRemoveCharPlacement(boolean remove_char_placement)
Sets whether to disable the output of character positions.
void setSvgFonts(boolean svg_fonts)
Sets whether to convert all fonts to SVG or not.
void setThumbnailSize(int size)
The maximum dimension of thumbnails.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_op_off

Constant Value: 0 (0x00000000)

public static final int e_op_on

Constant Value: 1 (0x00000001)

public static final int e_op_pdfx_on

Constant Value: 2 (0x00000002)

Public Constructors

public SVGOutputOptions ()

Creates an SVGOutputOptions object with default settings

Public Methods

public void setAnnots (boolean annots)

Control generation of form fields and annotations in SVG.

Parameters
annots if false, no form fields or annotations are converted. Default is true

public void setCompress (boolean svgz)

Compress output SVG files using SVGZ.

Parameters
svgz if true, SVG files are written in compressed format. Default is false.

public void setCreateXmlWrapper (boolean xml)

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

Parameters
xml if true, XML wrapper is created. Default is true.

public void setDtd (boolean dtd)

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

Parameters
dtd if false, no DTD is added to SVG files. Default is true.

public void setEmbedFonts (boolean embed_fonts)

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

Parameters
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.

public void setEmbedImages (boolean embed_images)

Sets whether to embed all images

Parameters
embed_images if true, images will be embeded

public void setFlattenContent (int flatten)

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.

Parameters
flatten select which flattening mode to use.

public void setFlattenThreshold (int threshold)

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.

Parameters
threshold the threshold setting to use.

public void setIndividualCharPlacement (boolean individual_char_placement)

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

Parameters
individual_char_placement if true, text will be positioned correctly

public void setNoFonts (boolean no_fonts)

Sets whether to disable conversion of font data to SVG

Parameters
no_fonts if true, font data conversion is disabled

public void setNoUnicode (boolean no_unicode)

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

Parameters
no_unicode if true, mapping of text to public Unicode region is disabled

public void setOutputThumbnails (boolean include_thumbs)

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

Parameters
include_thumbs if true thumbnails will be included

public void setOverprint (int mode)

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.

Parameters
mode e_op_on: always enabled; e_op_off: always disabled; e_op_pdfx_on: enabled for PDF/X files only.

public void setRemoveCharPlacement (boolean remove_char_placement)

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

Parameters
remove_char_placement if true, the output of character positions is disabled

public void setSvgFonts (boolean svg_fonts)

Sets whether to convert all fonts to SVG or not.

Parameters
svg_fonts if true, fonts are converted to SVG. Otherwise they are converted to OpenType. Default is false.

public void setThumbnailSize (int size)

The maximum dimension of thumbnails.

Parameters
size the maximum dimension (width or height) that thumbnails will have. Default is 400.