- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
pdftron::PDF::SVGOutputOptions Class Reference

`#include <Convert.h>`

## Public Member Functions
| SVGOutputOptions ()
void | SetEmbedImages (bool embed_images)
void | SetNoFonts (bool no_fonts)
void | SetSvgFonts (bool svg_fonts)
void | SetEmbedFonts (bool embed_fonts)
void | SetNoUnicode (bool no_unicode)
void | SetIndividualCharPlacement (bool individual_char_placement)
void | SetRemoveCharPlacement (bool remove_char_placement)
void | SetFlattenContent (enum Convert::FlattenFlag flatten)
void | SetFlattenThreshold (enum Convert::FlattenThresholdFlag threshold)
void | SetFlattenDPI (UInt32 dpi)
void | SetFlattenMaximumImagePixels (UInt32 max_pixels)
void | SetCompress (bool svgz)
void | SetOutputThumbnails (bool include_thumbs)
void | SetThumbnailSize (UInt32 size)
void | SetCreateXmlWrapper (bool xml)
void | SetDtd (bool dtd)
void | SetAnnots (bool annots)
void | SetOverprint (PDFRasterizer::OverprintPreviewMode mode)

## Protected Attributes
TRN_Obj | m_obj
SDF::ObjSet | m_objset

## Friends
class | Convert

## Detailed Description

A class containing options for ToSvg functions

Definition at line 2316 of file Convert.h.

## Constructor & Destructor Documentation

pdftron::PDF::SVGOutputOptions::SVGOutputOptions | ( |  | ) |

Creates an SVGOutputOptions object with default settings

## Member Function Documentation

void pdftron::PDF::SVGOutputOptions::SetAnnots | ( | bool | annots | ) |

Control generation of form fields and annotations in SVG.

Parameters

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

void pdftron::PDF::SVGOutputOptions::SetCompress | ( | bool | svgz | ) |

Compress output SVG files using SVGZ.

Parameters

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

void pdftron::PDF::SVGOutputOptions::SetCreateXmlWrapper | ( | bool | xml | ) |

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

Parameters

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

void pdftron::PDF::SVGOutputOptions::SetDtd | ( | bool | 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.

void pdftron::PDF::SVGOutputOptions::SetEmbedFonts | ( | bool | 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.

void pdftron::PDF::SVGOutputOptions::SetEmbedImages | ( | bool | embed_images | ) |

Sets whether to embed all images

Parameters

  embed_images | if true, images will be embedded. Default is false.

void pdftron::PDF::SVGOutputOptions::SetFlattenContent | ( | enum Convert::FlattenFlag | 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.

void pdftron::PDF::SVGOutputOptions::SetFlattenDPI | ( | UInt32 | 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

  dpi | the resolution in Dots Per Inch

void pdftron::PDF::SVGOutputOptions::SetFlattenMaximumImagePixels | ( | UInt32 | max_pixels | ) |

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

Note
  This setting now will no longer reduce the total number of image pixels. Instead a lower value will just produce more slices and vice versa.
  Since image compression works better with more pixels a larger max pixels should generally create smaller files.

Parameters

  max_pixels | the maximum number of pixels an image can have

void pdftron::PDF::SVGOutputOptions::SetFlattenThreshold | ( | enum Convert::FlattenThresholdFlag | 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.

void pdftron::PDF::SVGOutputOptions::SetIndividualCharPlacement | ( | bool | 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

void pdftron::PDF::SVGOutputOptions::SetNoFonts | ( | bool | no_fonts | ) |

Sets whether to disable conversion of font data to SVG

Parameters

  no_fonts | if true, font data conversion is disabled. Default is false.

void pdftron::PDF::SVGOutputOptions::SetNoUnicode | ( | bool | 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

void pdftron::PDF::SVGOutputOptions::SetOutputThumbnails | ( | bool | 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

void pdftron::PDF::SVGOutputOptions::SetOverprint | ( | PDFRasterizer::OverprintPreviewMode | 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

  op | e_op_on: always enabled; e_op_off: always disabled; e_op_pdfx_on: enabled for PDF/X files only.

void pdftron::PDF::SVGOutputOptions::SetRemoveCharPlacement | ( | bool | 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

void pdftron::PDF::SVGOutputOptions::SetSvgFonts | ( | bool | 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.

void pdftron::PDF::SVGOutputOptions::SetThumbnailSize | ( | UInt32 | size | ) |

The maximum dimension for thumbnails.

Parameters

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

## Friends And Related Function Documentation

friend class Convert
| friend

Definition at line 2450 of file Convert.h.

## Member Data Documentation

TRN_Obj pdftron::PDF::SVGOutputOptions::m_obj
| protected

Definition at line 2449 of file Convert.h.

SDF::ObjSet pdftron::PDF::SVGOutputOptions::m_objset
| protected

Definition at line 2451 of file Convert.h.

The documentation for this class was generated from the following file:

- PDF/Convert.h