PDFix SDK  5.0.27
PdeText Struct Referenceabstract

PdeText class. More...

Inheritance diagram for PdeText:
PdeElement

Public Member Functions

virtual int GetText (_out_ wchar_t *buffer, int len)=0
 Gets the text of the text element. More...
 
virtual bool HasTextState ()=0
 
virtual void GetTextState (_out_ PdfTextState *text_state)=0
 Gets the text state of the text element. More...
 
virtual int GetNumTextLines ()=0
 Gets the number of lines of text in text element. More...
 
virtual PdeTextLineGetTextLine (int index)=0
 Gets the text line element from the text element. More...
 
virtual int GetNumWords ()=0
 Gets the number of words of text in text element. More...
 
virtual PdeWordGetWord (int index)=0
 Gets the word from the text element. More...
 
virtual double GetLineSpacing ()=0
 Gets the text element line spacing. More...
 
virtual double GetIndent ()=0
 Gets the text element indent. More...
 
virtual PdfTextStyle GetTextStyle ()=0
 Gets the text element type. More...
 
virtual PdfTextRegexFlags GetTextFlags ()=0
 Gets the text element flags. More...
 
virtual int GetLabelLevel ()=0
 Gets the text element label level. More...
 
virtual bool SetLabelLevel (int level)=0
 Sets the text element label level. More...
 
- Public Member Functions inherited from PdeElement
virtual PdfElementType GetType ()=0
 Gets the type of an element. More...
 
virtual void GetBBox (_out_ PdfRect *bbox)=0
 
virtual bool SetBBox (const PdfRect *bbox)=0
 
virtual int GetId ()=0
 Gets the id of an element. The id is unique number on a page. More...
 
virtual void GetGraphicState (_out_ PdfGraphicState *g_state)=0
 Gets the graphics state information for an element. More...
 
virtual int GetNumChildren ()=0
 Gets the number of child elements in an element object. More...
 
virtual PdeElementGetChild (int index)=0
 Gets the requested child element from an element. More...
 
virtual PdfAlignment GetAlignment ()=0
 Gets the element alignment within the content column. More...
 
virtual double GetAngle ()=0
 Gets the element angle. More...
 
virtual void SetRender (bool render)=0
 Sets render mode of the element. This mode is used, when element is saved. More...
 
virtual void SetData (void *data)=0
 Sets user-supplied data to pass to the element. More...
 
virtual void * GetData ()=0
 Gets user-supplied data to pass to the element. More...
 
virtual bool SetAlt (const wchar_t *alt)=0
 Sets the alternate description of the element. More...
 
virtual bool SetActualText (const wchar_t *text)=0
 Sets the actual text of the element. More...
 
virtual int GetFlags ()=0
 Get the element state flags. More...
 
virtual bool SetFlags (int flags)=0
 Set the element state flags. More...
 

Detailed Description

PdeText class.

A PdeText object represents a group of text line objects which forms a paragraph in a PDF file.

Member Function Documentation

◆ GetIndent()

virtual double PdeText::GetIndent ( )
pure virtual

Gets the text element indent.

Returns
The text element indent.

◆ GetLabelLevel()

virtual int PdeText::GetLabelLevel ( )
pure virtual

Gets the text element label level.

Returns
The text element label level if exists. Otherwise returns -1.

◆ GetLineSpacing()

virtual double PdeText::GetLineSpacing ( )
pure virtual

Gets the text element line spacing.

Returns
The text element line spacing.

◆ GetNumTextLines()

virtual int PdeText::GetNumTextLines ( )
pure virtual

Gets the number of lines of text in text element.

Returns
Number of lines.
See also
PdeText::GetTextLine

◆ GetNumWords()

virtual int PdeText::GetNumWords ( )
pure virtual

Gets the number of words of text in text element.

Returns
Number of words.
See also
PdeText::GetWord

◆ GetText()

virtual int PdeText::GetText ( _out_ wchar_t *  buffer,
int  len 
)
pure virtual

Gets the text of the text element.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.
See also
PdeTextLine::GetText, PdeWord::GetText

◆ GetTextFlags()

virtual PdfTextRegexFlags PdeText::GetTextFlags ( )
pure virtual

Gets the text element flags.

Returns
The text element flags.

◆ GetTextLine()

virtual PdeTextLine* PdeText::GetTextLine ( int  index)
pure virtual

Gets the text line element from the text element.

Parameters
indexThe index of line to get.
Returns
PdeTextLine element.
See also
PdeText::GetNumTextLines

◆ GetTextState()

virtual void PdeText::GetTextState ( _out_ PdfTextState text_state)
pure virtual

Gets the text state of the text element.

Parameters
text_state(filled by method) A pointer to a PdfTextState structure specifying the text state of a first text character.
See also
PdeText::HasTextState

◆ GetTextStyle()

virtual PdfTextStyle PdeText::GetTextStyle ( )
pure virtual

Gets the text element type.

Returns
The text element type.

◆ GetWord()

virtual PdeWord* PdeText::GetWord ( int  index)
pure virtual

Gets the word from the text element.

Parameters
indexThe index of word to get.
Returns
PdeWord element.
See also
PdeText::GetNumWords

◆ HasTextState()

virtual bool PdeText::HasTextState ( )
pure virtual

Checks whether the text state can be obtained. It means that an each text line of the text element has the same text state.


Returns
true if the text state is the same for the whole text, false otherwise. In that case use PdeTextLine::GetTextState to obtain correct values.
See also
PdeText::GetTextState, PdeTextLine::GetTextState

◆ SetLabelLevel()

virtual bool PdeText::SetLabelLevel ( int  level)
pure virtual

Sets the text element label level.

Parameters
levelElement label level zero based. To remove label flag, set label level to -1.
Returns
true if text label level was set, false otherwise.