Gets an array of the locations of tagged visible items.

 

   

Syntax
 

Rects = XHtmlOptions.GetTagRects(ID)

 

   

Params
 
Name Type Description
ID Long The Object ID of the object.
Rects Array of XRects The location of tagged visible HTML objects.

 

   

Notes
 

Use this method to retrieve the locations of tagged visible items.

To use this method, you need to enable the tagging functionality. See the AddTags property for details.

This method takes an ID obtained from a call to Doc.AddImageUrl, Doc.AddImageHtml or Doc.AddImageToChain and returns the locations of any items which are visible on the PDF page as a result of that call.

The locations match up directly on a one-to-one basis with the IDs returned by the GetTagIDs method.

 

   

Example
 

The following example shows the effect that this parameter has on HTML rendering.

Set theDoc = Server.CreateObject("ABCpdf10.Doc")
theDoc.Rect.Inset 100, 100
theDoc.Rect.Top = 700
' Tag elements with style 'abcpdf-tag-visible' 'true'
theDoc.HtmlOptions.AddTags = True
id = theDoc.AddImageHtml("<FONT id=""p1"" style=""abcpdf-tag-visible: true; font-size: 72pt"">Gallia est omnis divisa in partes tres.</FONT>")
' Frame location of the tagged element
tagRects = theDoc.HtmlOptions.GetTagRects(id)
For Each theRect in tagRects
  theDoc.Rect.String = theRect.String
  theDoc.FrameRect
Next
' Output tag ID
tagIds = theDoc.HtmlOptions.GetTagIDs(id)
theDoc.Rect.String = theDoc.MediaBox.String
theDoc.Rect.Inset 20, 20
theDoc.FontSize = 64
theDoc.Color.String = "255 0 0"
theDoc.AddText "Tag ID """ + tagIds(0) +""":"
' Save the document
theDoc.Save "c:\mypdfs\HtmlOptionsGetTagRects.pdf"


HtmlOptionsGetTagRects.pdf