PDFix SDK  6.12.0
PdsWord Struct Referenceabstract

PdsWord class. More...

Public Member Functions

virtual void GetBBox (PdfRect *bbox) const =0
 
virtual void GetQuad (PdfQuad *quad) const =0
 
virtual int GetText (wchar_t *buffer, int len) const =0
 Gets the text of the word element. More...
 
virtual int GetNumChars () const =0
 Gets the number of characters in word. More...
 
virtual int GetCharCode (int index) const =0
 Gets the text of one character of the word. More...
 
virtual int GetCharText (int index, wchar_t *buffer, int len) const =0
 Gets the text of one character of the word. More...
 
virtual void GetCharTextState (int index, PdfTextState *text_state) const =0
 Gets the text state information of the word character. More...
 
virtual void GetCharBBox (int index, PdfRect *bbox) const =0
 Gets the bounding box of one character in user space coordinates. More...
 
virtual int GetNumTextRuns () const =0
 Gets the number of text runs in word. More...
 
virtual PdsTextRunGetTextRunAt (int index)=0
 Gets the text run at the index. More...
 

Detailed Description

PdsWord class.

A PdsWord object represents a word in a PDF file. Each word contains a sequence of characters in one or more styles. Each word consists of multiple textruns.

See also PdeWord.

Member Function Documentation

◆ GetBBox()

virtual void PdsWord::GetBBox ( PdfRect bbox) const
pure virtual

Gets the bounding box for a word in user space coordinates. To avoid the device-dependent effects of specifying objects in device space, PDF defines a device-independent coordinate system that always bears the same relationship to the current page, regardless of the output device on which printing or displaying occurs. This device-independent coordinate system is called user space. The origin of the user space(0, 0) represents the bottom-left corner of the PDF page. PDF files specify 72 points to 1 physical inch. The returned bounding box is guaranteed to encompass the word.

Parameters
bbox(Filled by the method) A pointer to a PdfRect structure specifying the bounding box of an element, specified in user space coordinates.

◆ GetCharBBox()

virtual void PdsWord::GetCharBBox ( int  index,
PdfRect bbox 
) const
pure virtual

Gets the bounding box of one character in user space coordinates.

Parameters
indexThe index of a character.
bbox(Filled by the method) A pointer to a PdfRect structure specifying the bounding box of a character, specified in user space coordinates.

◆ GetCharCode()

virtual int PdsWord::GetCharCode ( int  index) const
pure virtual

Gets the text of one character of the word.

Parameters
indexThe index of a character.
Returns
Charcode of the characted
See also
PdsWord::GetNumChars
PdsWord::GetCharText

◆ GetCharText()

virtual int PdsWord::GetCharText ( int  index,
wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the text of one character of the word.

Parameters
indexThe index of a character.
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
PdsWord::GetNumChars
PdsWord::GetCharCode

◆ GetCharTextState()

virtual void PdsWord::GetCharTextState ( int  index,
PdfTextState text_state 
) const
pure virtual

Gets the text state information of the word character.

Parameters
indexThe index of a character.
text_state(filled by method) A pointer to a PdfTextState structure specifying the text state of a character.

◆ GetNumChars()

virtual int PdsWord::GetNumChars ( ) const
pure virtual

Gets the number of characters in word.

Returns
Number of characters.

◆ GetNumTextRuns()

virtual int PdsWord::GetNumTextRuns ( ) const
pure virtual

Gets the number of text runs in word.

Returns
The number of textruns in PdsWord.

◆ GetQuad()

virtual void PdsWord::GetQuad ( PdfQuad quad) const
pure virtual

Gets the quad for a word in user space coordinates. See GetBBox for more info. The returned quad is guaranteed to encompass the element.

Parameters
quad(Filled by the method) A pointer to a PdfQuad structure specifying the bounding quad of an element, specified in user space coordinates.

◆ GetText()

virtual int PdsWord::GetText ( wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the text of the word 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.

◆ GetTextRunAt()

virtual PdsTextRun* PdsWord::GetTextRunAt ( int  index)
pure virtual

Gets the text run at the index.

Parameters
indexThe index of a textrun.
Returns
textrun