HtmlSaveOptionsExportTextInputFormFieldAsText Property |
Namespace: Aspose.Words.Saving
When set to true, exports text input form fields as normal text. When false, exports Word text input form fields as INPUT elements in HTML.
When exporting to EPUB, text input form fields are always saved as text due to requirements of this format.
Document doc = new Document(MyDir + "Rendering.docx"); // This is the directory we want the exported images to be saved to string imagesDir = Path.Combine(ArtifactsDir, "SaveHtmlWithOptions"); // The folder specified needs to exist and should be empty if (Directory.Exists(imagesDir)) Directory.Delete(imagesDir, true); Directory.CreateDirectory(imagesDir); // Set an option to export form fields as plain text, not as HTML input elements HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html); options.ExportTextInputFormFieldAsText = true; options.ImagesFolder = imagesDir; doc.Save(ArtifactsDir + "Document.SaveHtmlWithOptions.html", options);