NamedTagType

Represents an named tag type.

public class NamedTagType : TagType
Public Class NamedTagType
    Inherits TagType

Inheritance: ObjectTagTypeNamedTagType

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 named tag type.
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 a text area
        Dim MyTextArea As TextArea = New TextArea("This is the text of a TextArea", _
                    100, 100, 400, 30,ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
    
        ' Create a named tag type
        Dim MyNamedTagType As NamedTagType = New NamedTagType("Para", TagType.Paragraph)
    
        ' Create a structure element 
        Dim MyStructureElement As StructureElement = New StructureElement(MyNamedTagType, True)
    
        ' Tag the text area with the structure element
        MyTextArea.Tag = MyStructureElement
    
        ' Add the text area to the page
        MyPage.Elements.Add(MyTextArea)
     
        ' 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 a text area
        TextArea textArea = new TextArea("This is the " +"text of a TextArea", 100, 100, 400, 30,
                    ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18);

        // Create a named tag type
        NamedTagType namedTagType = new NamedTagType("Para", TagType.Paragraph);

        // Create a structure element 
        StructureElement structureElement = new StructureElement(namedTagType, true);

        // Tag the text area with the structure element
        textArea.Tag = structureElement;

        // Add the text area to the page
        page.Elements.Add(textArea);

        // Save the PDF
        document.Draw( outputPath );
    }
}

Constructors

NamedTagType(String, StandardTagType)Initializes a new instance of the NamedTagType class.

Properties

NameGets the name of the tag.
TagTypeGets the standard name of the tag.

Methods

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 name of the tag.

See Also

ceTe.DynamicPDF

In this topic