XHtmlOptions AddTags Property. Whether location of certain tags should be noted. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Value Read Only Description
[C#] bool

[Visual Basic]
Boolean
false No Whether location of certain tags should be noted.

 

   

Notes
 

This property determines whether certain tags in HTML are noted so that their location can be determined at a later date.

After adding your web pages you can retrieve information about the items on the PDF page using the GetTagIDs and the GetTagRects methods.

Note that only HTML elements which have an actual visual representation in the final output will be tagged. For example, a simple <form> element may not be tagged because it does not have a visual representation.

All elements of style 'abcpdf-tag-visible: true' will be tagged. For example:

<p id="p1" style="abcpdf-tag-visible: true">Gallia est omnis divisa in partes tres.<p>

For the Gecko engine, having a visual representation is not enough. The element must be a display item, which means that there is something to display for the element. Inner contents, such as text and inner elements, are children of the element and are not the element itself. This is important for layout-only elements such as <p>, <div>, and <span>; and style-only elements such as <em>, <strong>, and <font>. Border, outline, etc. are some of the things that make a layout/style-only element a display item:

<p id="p1" style="abcpdf-tag-visible: true; border: 1px solid transparent">Gallia est omnis divisa in partes tres.<p>

For the Gecko engine, you can use the CSS class 'abcpdf-tag-visible' instead of the CSS style 'abcpdf-tag-visible: true' (even if the CSS class is not defined), but it is deprecated. See UseCSSClassToAddTags in Registry Keys.

<p id="p1" class="abcpdf-tag-visible" style="border: 1px solid transparent">Gallia est omnis divisa in partes tres.<p>

 

   

Example
 

See the GetTagRects and the GetTagUntransformedRects methods.