PoDoFo 0.9.20
Public Member Functions | List of all members
PoDoFo::PdfTextBox Class Reference

#include <PdfTextBox.h>

Inherits PoDoFo::PdfField.

Public Member Functions

void SetText (nullable< const PdfString & > text)
 
nullable< const PdfString & > GetText () const
 
void SetMaxLen (int64_t maxLen)
 
int64_t GetMaxLen () const
 
void SetMultiLine (bool multiLine)
 
bool IsMultiLine () const
 
void SetPasswordField (bool password)
 
bool IsPasswordField () const
 
void SetFileField (bool file)
 
bool IsFileField () const
 
void SetSpellcheckingEnabled (bool spellcheck)
 
bool IsSpellcheckingEnabled () const
 
void SetScrollBarsEnabled (bool scroll)
 
bool IsScrollBarsEnabled () const
 
void SetCombs (bool combs)
 
bool IsCombs () const
 
void SetRichText (bool richText)
 
bool IsRichText () const
 

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