HtmlSaveOptionsExportTextBoxAsSvg Property

Controls how textboxes represented by Shape are saved to HTML, MHTML or EPUB. Default value is false.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool ExportTextBoxAsSvg { get; set; }

Property Value

Type: Boolean
Remarks

When set to true, exports textboxes as inline <svg> elements. When false, exports as <img> elements.

Examples
Shows how to export text boxes as scalable vector graphics.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Use a DocumentBuilder to insert a text box and give it some text content
Shape textBox = builder.InsertShape(ShapeType.TextBox, 100.0, 60.0);
builder.MoveTo(textBox.FirstParagraph);
builder.Write("My text box");

// Normally, all shapes such as the text box we placed are exported to .html as external images linked by the .html document
// We can save with an HtmlSaveOptions object with the ExportTextBoxAsSvg set to true to save text boxes as <svg> tags,
// which will cause no linked images to be saved and will make the inner text selectable
HtmlSaveOptions options = new HtmlSaveOptions();
options.ExportTextBoxAsSvg = true;

doc.Save(ArtifactsDir + "HtmlSaveOptions.ExportTextBox.html", options);
See Also