HtmlElementSizeOutputMode Enumeration |
Specifies how Aspose.Words exports element widths and heights to HTML, MHTML and EPUB.
Namespace:
Aspose.Words.Saving
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic enum HtmlElementSizeOutputMode
Public Enumeration HtmlElementSizeOutputMode
public enum class HtmlElementSizeOutputMode
type HtmlElementSizeOutputMode
Members
| Member name | Value | Description |
---|
| All | 0 |
All element sizes, both in absolute and relative units, specified in the document are exported.
|
| RelativeOnly | 1 |
Element sizes are exported only if they are specified in relative units in the document.
Fixed sizes are not exported in this mode. Visual agents will calculate missing sizes to make
document layout more natural.
|
| None | 2 |
Element sizes are not exported. Visual agents will build layout automatically according to relationship between elements.
|
Remarks
ExamplesShows how to preserve negative indents in the output .html.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Table table = builder.StartTable();
builder.InsertCell();
builder.Write("Cell 1");
builder.InsertCell();
builder.Write("Cell 2");
builder.EndTable();
table.LeftIndent = -36;
table.PreferredWidth = PreferredWidth.FromPoints(144);
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html);
options.AllowNegativeIndent = true;
options.TableWidthOutputMode = HtmlElementSizeOutputMode.RelativeOnly;
doc.Save(ArtifactsDir + "HtmlSaveOptions.NegativeIndent.html", options);
See Also