Click or drag to resize
Pdf Library for .NET

HtmlToPdfOptionsAutoFitHeight Property

Specifies the html content vertical auto fit mode.

Namespace:  SelectPdf
Assembly:  Select.HtmlToPdf (in Select.HtmlToPdf.dll) Version: 22.1
Syntax
public HtmlToPdfPageFitMode AutoFitHeight { get; set; }

Property Value

Type: HtmlToPdfPageFitMode
Remarks
The converter considers both AutoFitWidth and AutoFitHeight when the html content is rendered in the pdf page or specified rectangle.

If this property is set to NoAdjustment, the html content is not resized vertically in any way to fit the available space. If the content is larger, it will be cut and not all of it will be displayed in the generated pdf file.

If this property is set to ShrinkOnly, the html content is resized only if the content height is larger than the destination space (pdf page or rectangle) height. In this case, the content is shrunk to fit the destination space height and the elements that it contains (texts, images) will appear smaller in the generated pdf document than in the original web page. If the original content height is smaller than the destination height, no adjustments will be done and the content will be rendered exactly as it is, even though some additional white space might appear at the bottom.

If this property is set to AutoFit, the converter will treat it like ShrinkOnly.

The default value of this property is NoAdjustment and for rendering, the converter will only take AutoFitWidth into consideration.

See Also