TextArea.GetOverflowTextArea
Overloads
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. |
GetOverflowTextArea()
Returns a TextArea object containing the overflow text.
public TextArea GetOverflowTextArea()
Function GetOverflowTextArea() As TextArea
Returns
Returns a TextArea object.
Licensing Info
This method 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 you how to use the GetOverflowTextArea object to allow text of variable length to flow onto new pages as needed.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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
myVariableText &= "This is a sentence that I will use as my variable length text. "
Next
' Create a text area
Dim MyTextArea As TextArea = New TextArea(myVariableText, 0, 0, 250, 200)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyTextArea = MyTextArea.GetOverflowTextArea()
Loop While Not MyTextArea Is Nothing
' 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 string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "This is a sentence that I will use as my variable length text. ";
// Create a text area
TextArea textArea = new TextArea( variableText, 0, 0, 250, 200 );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( textArea );
// Add the page to the document
document.Pages.Add( page );
// Set the text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowTextArea will return null
textArea = textArea.GetOverflowTextArea();
} while( textArea != null );
// Save the PDF
document.Draw( outputPath );
}
}
Remarks
This method returns a new TextArea object that contains the remaining text that did not fit.
GetOverflowTextArea(Single, Single)
Returns a TextArea object containing the overflow text.
public TextArea GetOverflowTextArea(float x, float y)
Function GetOverflowTextArea(x As Single, y As Single) As TextArea
Parameters
X coordinate of the new text area.
Y coordinate of the new text area.
Returns
Returns a TextArea object.
Licensing Info
This method 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 you how to use the GetOverflowTextArea object to allow text of variable length to flow onto new pages as needed.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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
myVariableText &= "This is a sentence that I will use as my variable length text. "
Next
' Create a text area
Dim MyTextArea As TextArea = New TextArea(myVariableText, 0, 0, 250, 200)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyTextArea = MyTextArea.GetOverflowTextArea(50, 50)
Loop While Not MyTextArea Is Nothing
' 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 string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "This is a sentence that I will use as my variable length text. ";
// Create a text area
TextArea textArea = new TextArea( variableText, 0, 0, 250, 200 );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( textArea );
// Add the page to the document
document.Pages.Add( page );
// Set the text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowTextArea will return null
textArea = textArea.GetOverflowTextArea( 50, 50 );
} while( textArea != null );
// Save the PDF
document.Draw( outputPath );
}
}
Remarks
This method returns a new TextArea object that contains the remaining text that did not fit.
GetOverflowTextArea(Single, Single, Single, Single)
Returns a TextArea object containing the overflow text.
public TextArea GetOverflowTextArea(float x, float y, float width, float height)
Function GetOverflowTextArea(x As Single, y As Single, width As Single, height As Single) As TextArea
Parameters
X coordinate of the new text area.
Y coordinate of the new text area.
- width
- Single
Width of the new text area.
- height
- Single
Height of the new text area.
Returns
Returns a TextArea object.
Licensing Info
This method 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 you how to use the GetOverflowTextArea object to allow text of variable length to flow onto new pages as needed.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 string and assign it to text of variable length
Dim myVariableText As String = ""
Dim i As Integer
For i = 0 To 50
myVariableText &= "This is a sentence that I will use as my variable length text. "
Next
' Create a text area
Dim MyTextArea As TextArea = New TextArea(myVariableText, 0, 0, 250, 200)
Do
' Create a new page
Dim MyPage As Page = New Page
' Add the text area to the page;
MyPage.Elements.Add(MyTextArea)
' Add the page to the document
MyDocument.Pages.Add(MyPage)
' Set the text area object equal to the rest of the text that did not fit
' if all the text fit this will set textArea to null
MyTextArea = MyTextArea.GetOverflowTextArea(50, 50, 100,200)
Loop While Not MyTextArea Is Nothing
' 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 string and assign it to text of variable length
string variableText = "";
for( int i = 0; i < 50; i++ )
variableText += "This is a sentence that I will use as my variable length text. ";
// Create a text area
TextArea textArea = new TextArea( variableText, 0, 0, 250, 200 );
do
{
// Create a new page
Page page = new Page();
// Add the text area to the page;
page.Elements.Add( textArea );
// Add the page to the document
document.Pages.Add( page );
// Set the text area object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowTextArea will return null
textArea = textArea.GetOverflowTextArea( 50, 50, 100,200);
} while( textArea != null );
// Save the PDF
document.Draw( outputPath );
}
}
Remarks
This method returns a new TextArea object that contains the remaining text that did not fit.