HtmlSaveOptionsExportTextBoxAsSvg Property |
Namespace: Aspose.Words.Saving
When set to true, exports textboxes as inline <svg> elements. When false, exports as <img> elements.
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);