Enum BlockImportMode
Namespace: Aspose.Words.Loading
Assembly: Aspose.Words.dll (25.4.0)
Specifies how properties of block-level elements are imported from HTML-based documents.
public enum BlockImportMode
Fields
Merge = 0
Properties of parent blocks are merged and stored on child elements (i.e. paragraphs or tables).
Properties of parent blocks are merged as follows: margins are added together; borders of higher-level blocks are discarded and only the most inner-level borders are preserved. As a result, when this mode is specified, some formatting of blocks from the original document will be lost.
On the other hand, since all merged block-level properties are stored on document nodes, all formating in the resulting document will be available for modification.
Preserve = 1
Properties of parent blocks are imported to a special logical structure and are stored separately from document nodes.
Only margins and borders of 'body', 'div', and 'blockquote' HTML elements are imported. Properties of each HTML element are stored individually.
This mode allows to better preserve borders and margins seen in the HTML document and get better conversion results. The downside is that the resulting document gets harder to modify, since borders and margins stored in the logical structure are not available for editing.
This mode mimics MS Word's behavior regarding import of block properties.