PDFix SDK  6.12.0
PdsText Struct Referenceabstract

PdsText class. More...

Inheritance diagram for PdsText:
PdsPageObject

Public Member Functions

virtual int GetText (wchar_t *buffer, int len) const =0
 Gets the text of the page text element. More...
 
virtual void SetText (const wchar_t *buffer)=0
 Sets the text of the page text element. More...
 
virtual bool GetTextState (PdfDoc *doc, PdfTextState *text_state)=0
 Gets the text state of the text element. More...
 
virtual void SetTextState (const PdfTextState *text_state)=0
 Sets the text state of the text element. More...
 
virtual bool GetTextMatrix (PdfMatrix *matrix) const =0
 Gets the matrix of a text object. More...
 
virtual int GetNumChars () const =0
 Gets the number of characters in a text object. More...
 
virtual int GetCharText (int index, wchar_t *buffer, int len) const =0
 Gets the text for a character. More...
 
virtual bool GetCharBBox (int index, PdfRect *bbox) const =0
 Gets the bounding box of a character. More...
 
virtual bool GetCharQuad (int index, PdfQuad *quad) const =0
 Gets the quad bounding the specified character. More...
 
virtual float GetCharAdvanceWidth (int index) const =0
 
virtual PdsTextSplitAtChar (int index)=0
 Splits text object into two. More...
 
virtual PdfStateFlags GetCharStateFlags (int index)=0
 Get the text object state flags for character. More...
 
virtual bool SetCharStateFlags (int index, PdfStateFlags flags)=0
 Set the text object state flags for character. More...
 
- Public Member Functions inherited from PdsPageObject
virtual PdfPageObjectType GetObjectType () const =0
 Gets the type of an object. More...
 
virtual void GetBBox (PdfRect *bbox) const =0
 
virtual void GetQuad (PdfQuad *quad) const =0
 
virtual int GetId () const =0
 Gets the ordinal number of a page object. More...
 
virtual int GetStateFlags () const =0
 Get the object state flags. More...
 
virtual bool SetStateFlags (int flags)=0
 Set the object state flags. More...
 
virtual PdsObjectGetStructObject (bool struct_parent)=0
 
virtual PdsContentMarkGetContentMark ()=0
 
virtual PdfPageGetPage ()=0
 Gets a reference to the page on which the object is present. More...
 
virtual bool GetGState (PdfGraphicState *g_state)=0
 Gets the graphic state of the page object. More...
 
virtual bool SetGState (const PdfGraphicState *g_state)=0
 
virtual bool SetMatrix (const PdfMatrix *matrix)=0
 
virtual void MoveToContent (PdsContent *content, int index)=0
 Moves object to another content. More...
 
virtual PdsPageObjectCopyToContent (PdsContent *content, int index)=0
 Copies object to another content. More...
 

Detailed Description

PdsText class.

A PdsText is a text object in a PDF page content.

Member Function Documentation

◆ GetCharAdvanceWidth()

virtual float PdsText::GetCharAdvanceWidth ( int  index) const
pure virtual

Gets the advance width of a character. The advance width is the amount by which the current point advances when the character is drawn.

Parameters
indexIndex of the character in a text object.
Returns
Value indicating the advance width.

◆ GetCharBBox()

virtual bool PdsText::GetCharBBox ( int  index,
PdfRect bbox 
) const
pure virtual

Gets the bounding box of a character.

Parameters
indexIndex of the character in a text object.
bbox(Filled by the method) A pointer to a PdfRect structure specifying the bounding box of the character.
Returns
true if the bbox was successfully retrieved. false otherwise

◆ GetCharQuad()

virtual bool PdsText::GetCharQuad ( int  index,
PdfQuad quad 
) const
pure virtual

Gets the quad bounding the specified character.

Parameters
indexIndex of the character in a text object.
quad(Filled by the method) A pointer to a PdfQuad structure that bounds the specified character.
Returns
true if the quadrilieral was successfully retrieved. false otherwise

◆ GetCharStateFlags()

virtual PdfStateFlags PdsText::GetCharStateFlags ( int  index)
pure virtual

Get the text object state flags for character.

Returns
the object state flags as PdfStateFlags.

◆ GetCharText()

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

Gets the text for a character.

Parameters
indexIndex of the character in a text object.
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.

◆ GetNumChars()

virtual int PdsText::GetNumChars ( ) const
pure virtual

Gets the number of characters in a text object.

Returns
Number of characters in a text object.

◆ GetText()

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

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

◆ GetTextMatrix()

virtual bool PdsText::GetTextMatrix ( PdfMatrix matrix) const
pure virtual

Gets the matrix of a text object.

Parameters
matrix(Filled by the method) Pointer to the text transformation matrix.

◆ GetTextState()

virtual bool PdsText::GetTextState ( PdfDoc doc,
PdfTextState text_state 
)
pure virtual

Gets the text state of the text element.

Parameters
docreference to a document in which the text thate should be obtained
text_state(filled by method) A pointer to a PdfTextState structure specifying the text state of a text object.
Returns
true if the text state was successfully retrieved. false otherwise

◆ SetCharStateFlags()

virtual bool PdsText::SetCharStateFlags ( int  index,
PdfStateFlags  flags 
)
pure virtual

Set the text object state flags for character.

Parameters
flagsthe PdfStateFlags flags to be set
Returns
true if the object's state flags was set false otherwise

◆ SetText()

virtual void PdsText::SetText ( const wchar_t *  buffer)
pure virtual

Sets the text of the page text element.

Parameters
bufferText to be set.
lenLength of a buffer to be set.

◆ SetTextState()

virtual void PdsText::SetTextState ( const PdfTextState text_state)
pure virtual

Sets the text state of the text element.

Parameters
text_stateA pointer to a PdfTextState structure specifying the text state of a text object.

◆ SplitAtChar()

virtual PdsText* PdsText::SplitAtChar ( int  index)
pure virtual

Splits text object into two.

Parameters
indexIndex of the character in a text object where split should be done. The first text object is from character index 0 up to index. The second text object is from index + 1 to the end of the run.
Returns
Pointer to a newly created PdsText.