Represents a label.

For a list of all members of this type, see Label Members


System.Object
   ceTe.DynamicPDF.PageElement
      ceTe.DynamicPDF.PageElements.RotatingPageElement
public class Label : RotatingPageElement, IArea, ICoordinate

Remarks

This class can be used to place labels of text on a page.

Example

The following example will display text in a label on the page.

[Visual Basic]
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule
        
    Sub Main()
        
        ' Create a PDF Document
        Dim MyDocument As Document = New Document 
        
        ' Create a Page and add it to the document
        Dim MyPage As Page = New Page
        MyDocument.Pages.Add(MyPage)

        ' Create the string and label
        Dim MyText As String = "This is the dark blue, centered text at a 15 degree angle contained in the label."
        Dim MyLabel As Label = New Label(MyText, 0, 0, 512, 14, Font.Helvetica, 14, TextAlign.Center, Color.DarkBlue)

        ' Change the angle property 
        MyLabel.Angle = 15

        ' Add the label to the page
        MyPage.Elements.Add(MyLabel)

        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
        
    End Sub
End Module
[C#]
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{
    static void Main()
    {
        // Create a PDF Document
        Document document = new Document();

        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add( page );

        // Create the string and label
        string text = "This is the dark blue, centered text at a 15 degree angle contained in the label.";
        Label label = new Label( text, 0, 0, 512, 14, Font.Helvetica, 14, TextAlign.Center, Color.DarkBlue );

        // Change the angle property
        label.Angle = 15;

        // Add the label to the page
        page.Elements.Add( label );    

        // Save the PDF
        document.Draw( @"C:\MyDocument.pdf" );
    }
}

Requirements

Namespace: ceTe.DynamicPDF.PageElements Namespace

Assembly: DynamicPDF.Generator.[Edition].dll

See Also

Label members | ceTe.DynamicPDF.PageElements Namespace