TextArea

Represents an area of text.

public class TextArea : RotatingPageElement, IArea, ICoordinate, ISerializable
Public Class TextArea
    Inherits RotatingPageElement
    Implements IArea, ICoordinate, ISerializable

Inheritance: ObjectPageElementTaggablePageElementRotatingPageElementTextArea

Implements: IArea, ICoordinate, ISerializable

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 will display text on the page.
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 a text area
        Dim MyTextArea As TextArea = New TextArea("This is the " + "underlined text of a TextArea", 100, 100, 400, 30, _
     	ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18)
     
        ' Change the underline property to true
        MyTextArea.Underline = True
     
        ' Add the text 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();

        // 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 underlined " + "text of a TextArea", 100, 100, 400, 30,
           ceTe.DynamicPDF.Font.HelveticaBoldOblique, 18);

        // Change the underline property to true
        textArea.Underline = true;

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

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

Remarks

This class can be used to place text on a page. Using the methods GetOverflowText or GetOverflowTextArea and HasOverflowText, users can control the pagination of TextAreas that come from a source of unknown length. See the Text Continuation topic for more on text continuation.

Constructors

TextArea(String, Single, Single, Single, Single)Initializes a new instance of the TextArea class.
TextArea(String, Single, Single, Single, Single, Font)Initializes a new instance of the TextArea class.
TextArea(String, Single, Single, Single, Single, Font, Single)Initializes a new instance of the TextArea class.
TextArea(String, Single, Single, Single, Single, Font, Single, Color)Initializes a new instance of the TextArea class.
TextArea(String, Single, Single, Single, Single, Font, Single, TextAlign)Initializes a new instance of the TextArea class.
TextArea(String, Single, Single, Single, Single, Font, Single, TextAlign, Color)Initializes a new instance of the TextArea class.

Properties

AlignGets or sets the TextAlign enumeration that specifies the text alignment of the text area.
AngleGets or sets the heights of the angle element.
(Inherited from RotatingPageElement)
AutoLeadingGets or sets a value indicating whether the leading of the text area should be calculated automatically.
CleanParagraphBreaksGets or sets the clean paragraph breaks for the paragraphs of the text area.
FontGets or sets the Font object used to specify the font of the text for the text area.
FontSizeGets or sets the font size for the text of the text area.
HeightGets or sets the height of the text area.
IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
KerningEnabledEnable or disable the kerning property of the text.
LeadingGets or sets the leading for the text of the text area.
ParagraphIndentGets or sets the paragraph indenting for the paragraphs of the text area.
ParagraphSpacingGets or sets the paragraph spacing for the paragraphs of the text area.
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
RightToLeftGets or sets a value indicating if text should be displayed right to left.
StrikethroughGets or sets the strike through to use for the text of the text area.
TagGets or sets the tag of the taggable element.
(Inherited from TaggablePageElement)
TagOrderGets or sets the tag order of the taggable element.
(Inherited from TaggablePageElement)
TextGets or sets the text of the text area.
TextColorGets or sets the Color object to use for the text of the text area.
TextOutlineColorGets or sets the Color object to use for the text outline of the text area.
TextOutlineWidthGets or sets the line width to use for the text outline of the text area.
UnderlineGets or sets a value indicating if the text area is underlined.
VAlignGets or sets the VAlign enumeration that specifies the vertical text alignment of the text area.
WidthGets or sets the width of the text area.
XGets or sets the X coordinate of the page element.
(Inherited from RotatingPageElement)
YGets or sets the Y coordinate of the page element.
(Inherited from RotatingPageElement)

Methods

Draw(PageWriter)Draws the page element to the given PageWriter object.
(Inherited from RotatingPageElement)
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)
GetKerningValues()Gets the Kerning values.
GetLineTextWidth(Int32)Returns the width of the given line index with kerning spaces.
GetOverflowText()Returns the text remaining that will be clipped by the text area.
GetOverflowTextArea()Returns a TextArea object containing the overflow text.
GetOverflowTextArea(Single, Single)Returns a TextArea object containing the overflow text.
GetOverflowTextArea(Single, Single, Single, Single)Returns a TextArea object containing the overflow text.
GetRequiredHeight()Returns the height required to fit all of the text supplied.
GetTextHeight()Returns the height of the text that will be drawn.
GetType()Gets the Type of the current instance.
(Inherited from Object)
GetVisibleLineCount()Returns the number of lines that will be displayed in the current text area.
HasOverflowText()Returns a value indicating if there is text remaining that will not be drawn to the text area.
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.PageElements

In this topic