Hi,
At the moment, Aspose Words provides SaveFormat.HTML
(and HtmlSaveOptions
), as well as SaveFormat.HTML_FIXED
(and HtmlFixedSaveOptions
).
We’d like to export Word content from Aspose Words in the “HTML fixed” format, but are looking in vain for the equivalent of htmlSaveOptions.setHtmlVersion(HtmlVersion.XHTML)
.
Can you advise? That property is present on HtmlSaveOptions
, but seems missing on HtmlFixedSaveOptions
.
Kind regards, and thanks in advance,
Taras
@TarasTielkes Unfortunatly, this is expected. Fixed-page HTML documents use the HTML 5 syntax and the only valid DOCTYPE declaration for them is <!doctype html>
, which is always generated by Aspose.Words. We cannot write XHTML Transitional DOCTYPE to HTML 5 documents.
When you save the document with HtmlFixedSaveOptions
the document is rendered and look the same as it look if you save it to PDF or XPS using Aspose.Words. HtmlFixed format is good for viewing document, but it does not preserve original internal document structure and cannot be converted back to DOCX.