PDFix SDK  7.2.0
Loading...
Searching...
No Matches
PdeWord Struct Referenceabstract

PdeWord class. More...

#include <pdfix.h>

Inheritance diagram for PdeWord:
PdeElement

Public Member Functions

virtual int GetText (wchar_t *buffer, int len) const =0
 Gets the text of the word element. More...
 
virtual bool HasTextState () const =0
 
virtual void GetTextState (PdfTextState *text_state)=0
 Gets the text state of the word element. More...
 
virtual int GetNumChars (bool include_spaces) const =0
 Gets the number of characters in word element. 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 GetWordFlags () const =0
 Gets the word flags like filling, etc. More...
 
virtual PdeElementGetBackground ()=0
 Gets the background element. Iterate it's children to get background images. More...
 
virtual void GetOrigin (PdfPoint *point) const =0
 Gets the origin position of the word. More...
 
virtual int GetNumTextRuns (bool include_spaces) const =0
 Gets the number of text runs in word. More...
 
virtual PdeTextRunGetTextRun (int index)=0
 Gets the text run at the index. More...
 
virtual int GetCharStateFlags (int index)=0
 Get the word object state flags for character. More...
 
- Public Member Functions inherited from PdeElement
virtual PdfElementType GetType () const =0
 Gets the type of an element. More...
 
virtual void GetBBox (PdfRect *bbox) const =0
 
virtual bool SetBBox (const PdfRect *bbox)=0
 
virtual void GetQuad (PdfQuad *quad) const =0
 
virtual int GetId ()=0
 Gets the id of an element. The id is unique number on a page. More...
 
virtual void GetGraphicState (PdfGraphicState *g_state)=0
 Gets the graphics state information for an element. More...
 
virtual int GetNumChildren () const =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 () const =0
 Gets the element alignment within the content column. More...
 
virtual float GetAngle () const =0
 Gets the element angle. More...
 
virtual void SetData (void *data)=0
 Sets user-supplied data to pass to the element. More...
 
virtual void * GetData () const =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 GetTag (wchar_t *buffer, int len) const =0
 Gets the tag name of the element. More...
 
virtual bool SetTag (const wchar_t *text)=0
 Sets the tag name of the element. More...
 
virtual int GetTagId (wchar_t *buffer, int len) const =0
 Gets the tag id of the element. More...
 
virtual bool SetTagId (const wchar_t *id)=0
 Sets the tag id of the element. More...
 
virtual int GetFlags () const =0
 Get the element state flags. More...
 
virtual bool SetFlags (int flags)=0
 Set the element state flags. More...
 
virtual int GetStateFlags () const =0
 Get the element state flags. More...
 
virtual bool SetStateFlags (PdfStateFlags flags, bool objects)=0
 Set the element state flags. More...
 
virtual int GetNumPageObjects () const =0
 Get the the number pf page object in the element. More...
 
virtual PdsPageObjectGetPageObject (int index)=0
 Get the the page object of the element by index. More...
 
virtual PdePageMapGetPageMap ()=0
 Get the the page map object containing this element. More...
 
virtual PdfLabelType GetLabelType () const =0
 Gets the element label type. More...
 
virtual bool SetLabelType (PdfLabelType type)=0
 Sets the element type level. More...
 

Detailed Description

PdeWord class.

A PdeWord object represents a word in a PDF file. Each word contains a sequence of characters in one or more styles.

Member Function Documentation

◆ GetBackground()

virtual PdeElement * PdeWord::GetBackground ( )
pure virtual

Gets the background element. Iterate it's children to get background images.

Returns
The background element.

◆ GetCharBBox()

virtual void PdeWord::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 PdeWord::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
PdeWord::GetNumChars
PdeWord::GetCharText

◆ GetCharStateFlags()

virtual int PdeWord::GetCharStateFlags ( int  index)
pure virtual

Get the word object state flags for character.

Returns
the character state flags as PdfStateFlags.

◆ GetCharText()

virtual int PdeWord::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
PdeWord::GetNumChars
PdeWord::GetCharCode

◆ GetCharTextState()

virtual void PdeWord::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 PdeWord::GetNumChars ( bool  include_spaces) const
pure virtual

Gets the number of characters in word element.

Parameters
include_spacesCount also spaces after last word char if true. False othervise.
Returns
Number of characters.

◆ GetNumTextRuns()

virtual int PdeWord::GetNumTextRuns ( bool  include_spaces) const
pure virtual

Gets the number of text runs in word.

Parameters
include_spacesCount also spaces after last word char if true. False othervise.
Returns
The number of textruns in PdeWord.

◆ GetOrigin()

virtual void PdeWord::GetOrigin ( PdfPoint point) const
pure virtual

Gets the origin position of the word.

Parameters
point(Filled by the method) An origin position of the word.

◆ GetText()

virtual int PdeWord::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.
See also
PdeTextLine::GetText, PdeText::GetText

◆ GetTextRun()

virtual PdeTextRun * PdeWord::GetTextRun ( int  index)
pure virtual

Gets the text run at the index.

Parameters
indexThe index of a textrun.
Returns
textrun

◆ GetTextState()

virtual void PdeWord::GetTextState ( PdfTextState text_state)
pure virtual

Gets the text state of the word element.

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

◆ GetWordFlags()

virtual int PdeWord::GetWordFlags ( ) const
pure virtual

Gets the word flags like filling, etc.

Returns
The combination of PdfWordFlags.

◆ HasTextState()

virtual bool PdeWord::HasTextState ( ) const
pure virtual

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

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