com.aspose.words

Class SvgTextOutputMode

  • java.lang.Object
    • com.aspose.words.SvgTextOutputMode
public class SvgTextOutputMode 
extends java.lang.Object

Utility class containing constants.

Example:

Shows how to mimic the properties of images when converting a .docx document to .svg.
Document doc = new Document(getMyDir() + "Document.docx");

// Configure the SvgSaveOptions object to save with no page borders or selectable text
SvgSaveOptions options = new SvgSaveOptions();
{
    options.setFitToViewPort(true);
    options.setShowPageBorder(false);
    options.setTextOutputMode(SvgTextOutputMode.USE_PLACED_GLYPHS);
}

doc.save(getArtifactsDir() + "SvgSaveOptions.SaveLikeImage.svg", options);

Field Summary
static final intUSE_SVG_FONTS = 0
SVG fonts are used to render text. Note, not all browsers support SVG fonts.
static final intUSE_TARGET_MACHINE_FONTS = 1
Fonts installed on the target machine are used to render text. Note, if some of fonts used in the document are not available on the target machine, document can look differently.
static final intUSE_PLACED_GLYPHS = 2
Text is rendered using curves. Note, text selection will not work if you use this option.
 

    • Field Detail

      • USE_SVG_FONTS = 0

        public static final int USE_SVG_FONTS
        SVG fonts are used to render text. Note, not all browsers support SVG fonts.
      • USE_TARGET_MACHINE_FONTS = 1

        public static final int USE_TARGET_MACHINE_FONTS
        Fonts installed on the target machine are used to render text. Note, if some of fonts used in the document are not available on the target machine, document can look differently.
      • USE_PLACED_GLYPHS = 2

        public static final int USE_PLACED_GLYPHS
        Text is rendered using curves. Note, text selection will not work if you use this option.