Web | |
The WebElementsCollection type exposes the following members.
| Name | Description | |
|---|---|---|
| WebElementsCollection |
| Name | Description | |
|---|---|---|
| Count | Gets the number of mappings in the collection. | |
| Item | Gets the mapping at the specified zero based index from the collection. |
| Name | Description | |
|---|---|---|
| GetElementByHtmlId | Gets the mapping in PDF of the HTML element with the specified HTML ID. The search is case insensitive. | |
| GetElementsByTagName | Gets the mappings in PDF of the HTML elements with the specified HTML tag name. The search is case insensitive. | |
| GetEnumerator | Returns an enumerator that iterates through the WebElement mappings in the collection. |
HtmlToPdf converter = new HtmlToPdf(); converter.Options.WebElementsMappingOptions.CssSelectors = new string[] { "h1" }; PdfDocument doc = converter.ConvertUrl("https://www.google.com"); WebElementsCollection elements = converter.Options.WebElementsMappingOptions.Result; System.Console.WriteLine("Mapped elements: " + elements.Count); doc.Close();