Click or drag to resize
Pdf Library for .NET

HtmlToPdfResult Class

Holds detailed information produced by a completed HTML to PDF conversion — page counts, web and pdf page sizes, the scale factor, the drawn rectangles, and the captured console log. Obtained from ConversionResult after a convert call returns; all properties are read-only to consumer code.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalHtmlToPdfResult

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public class HtmlToPdfResult

The HtmlToPdfResult type exposes the following members.

Constructors
 NameDescription
Public methodHtmlToPdfResult 
Top
Properties
 NameDescription
Public propertyConsoleLog Gets the text written to the browser console by the converted web page during rendering.
Public propertyPdfPageCount Gets the number of pages in the generated pdf document.
Public propertyPdfPageLastIndex Gets or sets the zero based index of the last pdf page that received rendered content.
Public propertyPdfPageLastRectangle Gets or sets the rectangle, in points, occupied by the rendered content on the last pdf page.
Public propertyPdfPageScaleFactor Gets the factor by which the rendered web page was scaled to fit the pdf page.
Public propertyPdfPageSize Gets the size, in points, of a page in the generated pdf document.
Public propertyPdfPagesRectangles Gets the rectangles, in points, occupied by the rendered content on each pdf page.
Public propertyWebPageInformation Gets the metadata (title, keywords, description) read from the converted web page.
Public propertyWebPageSize Gets the size, in points, of the rendered web page.
Top
Example
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl("https://www.google.com");
HtmlToPdfResult result = converter.ConversionResult;
System.Console.WriteLine("Pages: " + result.PdfPageCount);
doc.Save("out.pdf");
doc.Close();
See Also