Skip to main content

StructureElement

Version: 12.0

cete.dynamicpdf.structureelement

StructureElement​

Represents an structure element.

public class StructureElement : Tag
Public Class StructureElement
Inherits Tag

Inheritance: Object → Resource → Tag → StructureElement

Licensing Info​

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.

public StructureElement(TagType tag)
Public Sub New (tag As TagType)

Parameters​

Tag type of the structure element.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

StructureElement(TagType, Boolean)​

Initializes a new instance of the StructureElement class.

public StructureElement(TagType tag, bool includeDefaultAttributes)
Public Sub New (tag As TagType, includeDefaultAttributes As Boolean)

Parameters​

Tag type of the structure element.

  • includeDefaultAttributes: Boolean

Specifies if default attributes need to be add.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Properties​

Abbreviation​

Gets or sets a value indicating expandable form of an abbreviation.

public string Abbreviation { get; set; }
Public Property Abbreviation As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ActualText​

Gets or sets a value indicating the text that is exact replacement for the structure element.

public string ActualText { get; set; }
Public Property ActualText As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

AlternateText​

Gets or sets a value indicating alternate description of the structure element.

public string AlternateText { get; set; }
Public Property AlternateText As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

AttributeLists​

Adds an AttributeObject to a set of attribute objects.

public AttributeTypeList AttributeLists { get; }
Public Property AttributeLists As AttributeTypeList

Property Value​

AttributeTypeList

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Classes​

Adds a AttributeClass to set of attribute classes having names.

public AttributeClassList Classes { get; }
Public Property Classes As AttributeClassList

Property Value​

AttributeClassList

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Identifier​

Gets or sets a value indicating identifier for the structure element.

public string Identifier { get; set; }
Public Property Identifier As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

IncludeDefaultAttributes​

Gets or sets a value indicating default attributes to be include.

public bool IncludeDefaultAttributes { get; set; }
Public Property IncludeDefaultAttributes As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Language​

Gets or sets a value indicating natural language for all text in the structure element.

public string Language { get; set; }
Public Property Language As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Order​

Gets or sets a value indicating the order in its parent structure element or structure tree root.

public int Order { get; set; }
Public Property Order As Int32

Property Value​

Int32

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Parent​

Gets or sets a value indicating parent structure element.

public StructureElement Parent { get; set; }
Public Property Parent As StructureElement

Property Value​

StructureElement

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

RequiredPdfObjects​

Gets the number of PDF objects required by the resource. (Inherited from Resource)

public int RequiredPdfObjects { get; }
Public Property RequiredPdfObjects As Int32

Property Value​

Int32

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ResourceType​

Gets the type of resource. (Inherited from Resource)

public ResourceType ResourceType { get; }
Public Property ResourceType As ResourceType

Property Value​

ResourceType

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

TagType​

Gets a value indicating standard structure type or named structure type.

public TagType TagType { get; }
Public Property TagType As TagType

Property Value​

TagType

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Title​

e Gets or sets a value indicating title of structure element.

public string Title { get; set; }
Public Property Title As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Uid​

Gets the unique ID of the resource. (Inherited from Resource)

public long Uid { get; }
Public Property Uid As Int64

Property Value​

Int64

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Methods​

Draw(DocumentWriter)​

Draws the structure element to the given DocumentWriter object.

public void Draw(DocumentWriter writer)
Sub Draw(writer As DocumentWriter)

Parameters​

DocumentWriter object to receive the structure element output.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ToString()​

Gets the ID of the structure element.

public string ToString()
Function ToString() As String

Returns​

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF