Class: SVGOutputOptions

PDFNet.Convert. SVGOutputOptions


new SVGOutputOptions()

An object containing options for ToSvg functions

Methods


setAnnots(annots)

Control generation of form fields and annotations in SVG.
Parameters:
Name Type Description
annots boolean if false, no form fields or annotations are converted. Default is true
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setCompress(svgz)

Compress output SVG files using SVGZ.
Parameters:
Name Type Description
svgz boolean if true, SVG files are written in compressed format. Default is false.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setCreateXmlWrapper(xml)

Create a XML document that contains metadata of the SVG document created.
Parameters:
Name Type Description
xml boolean if true, XML wrapper is created. Default is true.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setDtd(dtd)

Set whether the DTD declaration is included in the SVG files.
Parameters:
Name Type Description
dtd boolean if false, no DTD is added to SVG files. Default is true.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setEmbedFonts(embed_fonts)

Sets whether to embed fonts into each SVG page file, or to have them shared.
Parameters:
Name Type Description
embed_fonts boolean 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.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setEmbedImages(embed_images)

Sets whether to embed all images
Parameters:
Name Type Description
embed_images boolean if true, images will be embedded. Default is false.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setFlattenContent(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:
Name Type Description
flatten number
PDFNet.Convert.FlattenFlag = {
	e_off : 0
	e_simple : 1
	e_fast : 2
	e_high_quality : 3
}
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setFlattenDPI(dpi)

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.
Parameters:
Name Type Description
dpi number the resolution in Dots Per Inch
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setFlattenMaximumImagePixels(max_pixels)

Specifies the maximum image slice size in pixels. Default is 2000000.
Parameters:
Name Type Description
max_pixels number the maximum number of pixels an image can have
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setFlattenThreshold(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:
Name Type Description
threshold number
PDFNet.PDFNet.Convert.FlattenThresholdFlag = {
	e_very_strict : 0
	e_strict : 1
	e_default : 2
	e_keep_most : 3
	e_keep_all : 4
}
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setIndividualCharPlacement(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:
Name Type Description
individual_char_placement boolean if true, text will be positioned correctly
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setNoFonts(no_fonts)

Sets whether to disable conversion of font data to SVG
Parameters:
Name Type Description
no_fonts boolean if true, font data conversion is disabled. Default is false.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setNoUnicode(no_unicode)

Sets whether to disable mapping of text to public Unicode region. Instead text will be converted using a custom encoding
Parameters:
Name Type Description
no_unicode boolean if true, mapping of text to public Unicode region is disabled
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setOutputThumbnails(include_thumbs)

Sets whether per page thumbnails should be included in the file. Default is true.
Parameters:
Name Type Description
include_thumbs boolean if true thumbnails will be included
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setOverprint(op)

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:
Name Type Description
op number
PDFNet.PDFRasterizer.OverprintPreviewMode = {
	e_op_off : 0
	e_op_on : 1
	e_op_pdfx_on : 2
}
e_op_on: always enabled; e_op_off: always disabled; e_op_pdfx_on: enabled for PDF/X files only.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setRemoveCharPlacement(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:
Name Type Description
remove_char_placement boolean if true, the output of character positions is disabled
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setSvgFonts(svg_fonts)

Sets whether to convert all fonts to SVG or not.
Parameters:
Name Type Description
svg_fonts boolean if true, fonts are converted to SVG. Otherwise they are converted to OpenType. Default is false.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions

setThumbnailSize(size)

The maximum dimension for thumbnails.
Parameters:
Name Type Description
size number the maximum dimension (width or height) that thumbnails will have. Default is 400.
Returns:
this object, for call chaining
Type
PDFNet.Convert.SVGOutputOptions