The following example shows the effect that this parameter has on
HTML rendering.
[C#]
Doc theDoc = new
Doc(); theDoc.Rect.Inset(100, 100); theDoc.Rect.Top =
700; // Tag elements with style 'abcpdf-tag-visible:
true' theDoc.HtmlOptions.AddTags = true; int 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 XRect[] tagRects =
theDoc.HtmlOptions.GetTagRects(id); foreach (XRect theRect in
tagRects) { theDoc.Rect.String =
theRect.ToString(); theDoc.FrameRect(); } //
Output tag ID string[] 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(Server.MapPath("HtmlOptionsGetTagRects.pdf")); theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc =
New Doc() theDoc.Rect.Inset(100, 100) theDoc.Rect.Top =
700 ' Tag elements with style 'abcpdf-tag-visible:
true' theDoc.HtmlOptions.AddTags = true Dim id As
Integer 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 Dim tagRects As XRect() tagRects =
theDoc.HtmlOptions.GetTagRects(id) Dim theRect As XRect For
Each theRect in tagRects theDoc.Rect.String =
theRect.ToString() theDoc.FrameRect() Next '
Output tag ID Dim tagIds As String() 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(Server.MapPath("HtmlOptionsGetTagRects.pdf")) theDoc.Clear()
HtmlOptionsGetTagRects.pdf
|