PoDoFo  1.0.0-dev
Public Member Functions | Friends | List of all members
PoDoFo::PdfTextBox Class Referencefinal

A text field in a PDF file. More...

#include <PdfTextBox.h>

Inherits PoDoFo::PdfField.

Public Member Functions

void SetText (nullable< const PdfString & > text)
 Sets the text contents of this text field. More...
 
nullable< const PdfString & > GetText () const
 
void SetMaxLen (int64_t maxLen)
 Sets the max length in characters of this textfield. More...
 
int64_t GetMaxLen () const
 
void SetMultiLine (bool multiLine)
 Create a multi-line text field that can contains multiple lines of text. More...
 
bool IsMultiLine () const
 
void SetPasswordField (bool password)
 Create a password text field that should not echo entered characters visibly to the screen. More...
 
bool IsPasswordField () const
 
void SetFileField (bool file)
 Create a file selection field. More...
 
bool IsFileField () const
 
void SetSpellCheckingEnabled (bool spellcheck)
 Enable/disable spellchecking for this text field. More...
 
bool IsSpellCheckingEnabled () const
 
void SetScrollBarsEnabled (bool scroll)
 Enable/disable scrollbars for this text field. More...
 
bool IsScrollBarsEnabled () const
 
void SetCombs (bool combs)
 Divide the text field into max-len equal combs. More...
 
bool IsCombs () const
 
void SetRichText (bool richText)
 Creates a richtext field. More...
 
bool IsRichText () const
 
PdfTextBoxGetParent ()
 
const PdfTextBoxGetParent () const
 

Friends

class PdfField
 

Detailed Description

A text field in a PDF file.

Users can enter text into a text field. Single and multi line text is possible, as well as richtext. The text can be interpreted as path to a file which is going to be submitted.

Member Function Documentation

◆ GetMaxLen()

int64_t PdfTextBox::GetMaxLen ( ) const
Returns
the max length of this textfield in characters or -1 if no max length was specified

◆ GetText()

nullable< const PdfString & > PdfTextBox::GetText ( ) const
Returns
the text contents of this text field

◆ IsCombs()

bool PdfTextBox::IsCombs ( ) const
Returns
true if the text field has a division into equal combs set on it

◆ IsFileField()

bool PdfTextBox::IsFileField ( ) const
Returns
true if the contents are treated as filename

◆ IsMultiLine()

bool PdfTextBox::IsMultiLine ( ) const
Returns
true if this text field can contain multiple lines of text

◆ IsPasswordField()

bool PdfTextBox::IsPasswordField ( ) const
Returns
true if this field is a password field that does not echo entered characters on the screen

◆ IsRichText()

bool PdfTextBox::IsRichText ( ) const
Returns
true if this is a richtext text field

◆ IsScrollBarsEnabled()

bool PdfTextBox::IsScrollBarsEnabled ( ) const
Returns
true if scrollbars are enabled for this text field

◆ IsSpellCheckingEnabled()

bool PdfTextBox::IsSpellCheckingEnabled ( ) const
Returns
true if spellchecking is enabled for this text field

◆ SetCombs()

void PdfTextBox::SetCombs ( bool  combs)

Divide the text field into max-len equal combs.

Parameters
combsif true enable division into combs

By default combs are disabled. Requires the max-len property to be set.

See also
SetMaxLen

◆ SetFileField()

void PdfTextBox::SetFileField ( bool  file)

Create a file selection field.

The entered contents are treated as filename to a file whose contents are submitted as the value of the field.

Parameters
fileif true the contents are treated as a pathname to a file to submit

◆ SetMaxLen()

void PdfTextBox::SetMaxLen ( int64_t  maxLen)

Sets the max length in characters of this textfield.

Parameters
maxLenthe max length of this textfields in characters

◆ SetMultiLine()

void PdfTextBox::SetMultiLine ( bool  multiLine)

Create a multi-line text field that can contains multiple lines of text.

Parameters
multiLineif true a multi line field is generated, otherwise the text field can contain only a single line of text.

The default is to create a single line text field.

◆ SetPasswordField()

void PdfTextBox::SetPasswordField ( bool  password)

Create a password text field that should not echo entered characters visibly to the screen.

Parameters
passwordif true a password field is created

The default is to create no password field

◆ SetRichText()

void PdfTextBox::SetRichText ( bool  richText)

Creates a richtext field.

Parameters
richTextif true creates a richtext field

By default richtext is disabled.

◆ SetScrollBarsEnabled()

void PdfTextBox::SetScrollBarsEnabled ( bool  scroll)

Enable/disable scrollbars for this text field.

Parameters
scrollif true scrollbars will be enabled

Text fields have scrollbars by default

◆ SetSpellCheckingEnabled()

void PdfTextBox::SetSpellCheckingEnabled ( bool  spellcheck)

Enable/disable spellchecking for this text field.

Parameters
spellCheckif true spellchecking will be enabled

Text fields are spellchecked by default

◆ SetText()

void PdfTextBox::SetText ( nullable< const PdfString & >  text)

Sets the text contents of this text field.

Parameters
textthe text of this field

The documentation for this class was generated from the following files: