StructureElement
Represents an structure element.
public class StructureElement : Tag
Public Class StructureElement
Inherits Tag
Inheritance: ObjectResourceTagStructureElement
Licensing Info
This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Examples
The following example shows how to use a structure element.Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
' Create an image
Dim MyImage As Image = New Image("C:\MyImage.gif", 100, 100)
MyImage.Height = 100
MyImage.Width = 100
' Create a structure element
Dim MyStructureElement As StructureElement = New StructureElement(TagType.Figure, True)
MyStructureElement.AlternateText = "My Image"
' Tag the image with the structure element
MyImage.Tag = MyStructureElement
' Add the image to the page
MyPage.Elements.Add(MyImage)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();
// Specify document as a tagged PDF
document.Tag = new TagOptions();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create an image
Image image = new Image(imagePath, 100, 100);
image.Height = 100;
image.Width = 100;
// Create a structure element
StructureElement structureElement = new StructureElement(TagType.Figure, true);
structureElement.AlternateText = "My Image";
// Tag the image with the structure element
image.Tag = structureElement;
// Add the image to the page
page.Elements.Add(image);
// Save the PDF
document.Draw(outputPath);
}
}
Constructors
StructureElement(TagType) | Initializes a new instance of the StructureElement class. |
StructureElement(TagType, Boolean) | Initializes a new instance of the StructureElement class. |
Properties
Abbreviation | Gets or sets a value indicating expandable form of an abbreviation. |
ActualText | Gets or sets a value indicating the text that is exact replacement for the structure element. |
AlternateText | Gets or sets a value indicating alternate description of the structure element. |
AttributeLists | Adds an AttributeObject to a set of attribute objects. |
Classes | Adds a AttributeClass to set of attribute classes having names. |
Identifier | Gets or sets a value indicating identifier for the structure element. |
IncludeDefaultAttributes | Gets or sets a value indicating default attributes to be include. |
Language | Gets or sets a value indicating natural language for all text in the structure element. |
Order | Gets or sets a value indicating the order in its parent structure element or structure tree root. |
Parent | Gets or sets a value indicating parent structure element. |
RequiredPdfObjects | Gets the number of PDF objects required by the resource. (Inherited from Resource) |
ResourceType | Gets the type of resource. (Inherited from Resource) |
TagType | Gets a value indicating standard structure type or named structure type. |
Title | e Gets or sets a value indicating title of structure element. |
Uid | Gets the unique ID of the resource. (Inherited from Resource) |
Methods
Draw(DocumentWriter) | Draws the structure element to the given DocumentWriter object. |
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
ToString() | Gets the ID of the structure element. |