Skip to main content

HtmlDocumentExporterOptions.AnchorImagesToPage Property

Gets or sets a value indicating whether to place images on an HTML page at absolute positions relative to the page’s top-left corner.

Namespace: DevExpress.XtraSpreadsheet.Export

Assembly: DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

[DefaultValue(false)]
public bool AnchorImagesToPage { get; set; }

Property Value

Type Default Description
Boolean false

true, to anchor images to a page; otherwise, false.

Remarks

The following table explains how the AnchorImagesToPage property works.

AnchorImagesToPage

Description

False (Default)

Images are anchored to the table cells and their position is defined by the offsets from the left and top cell edges:

<table>
    ...
    <tr>
        ...
        <td><img src="image.png" ... style="position:absolute;left:0px;top:0px;"/></td>
        ...
    </tr>
    ...
</table>

True

Images are written to HTML after the table and their position is defined by the offsets from the webpage’s left and top edges.

<table>
...
</table>
<img src="image.png" ... style="position:absolute;left:100px;top:100px;"/>

The following code snippets (auto-collected from DevExpress Examples) contain references to the AnchorImagesToPage property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also