 |
WebElement Class |
Represents the mapping of a HTML element in the PDF document as a collection of PDF
rectangles. A HTML element can span on many pages in the generated PDF document
and therefore, in general, many PDF rectangles are necessary to completely describe
the mapping of a HTML element in PDF. Instances are produced by the conversion and
obtained from
Result.
Inheritance HierarchySystemObject
SelectPdf.UniversalWebElement
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
SyntaxThe WebElement type exposes the following members.
Properties
ExampleHtmlToPdf converter = new HtmlToPdf();
converter.Options.WebElementsMappingOptions.CssSelectors = new string[] { "h1" };
PdfDocument doc = converter.ConvertUrl("https://www.google.com");
WebElement element = converter.Options.WebElementsMappingOptions.Result[0];
System.Console.WriteLine(element.HtmlElementText);
doc.Close();Dim converter As New HtmlToPdf()
converter.Options.WebElementsMappingOptions.CssSelectors = New String() {"h1"}
Dim doc As PdfDocument = converter.ConvertUrl("https://www.google.com")
Dim element As WebElement = converter.Options.WebElementsMappingOptions.Result(0)
System.Console.WriteLine(element.HtmlElementText)
doc.Close()
See Also