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

PdsText class. More...

#include <pdfix.h>

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 (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 GetCharCode (int index) const =0
 Gets the text of one character of the text. 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 ()=0
 Gets the ordinal number of a page object. More...
 
virtual int GetStateFlags () const =0
 Get the object state flags. More...
 
virtual bool SetStateFlags (PdfStateFlags flags)=0
 Set the object state flags. More...
 
virtual PdsObjectGetStructObject (bool struct_parent)=0
 
virtual PdsContentMarkGetContentMark ()=0
 
virtual int GetMcid ()=0
 Gets content mark ID for this object or -1 if the object does not have MCID property. More...
 
virtual bool RemoveTags (PdfContentMarkFlags flags)=0
 
virtual PdfPageGetPage ()=0
 Gets a reference to the page on which the object is present. More...
 
virtual int GetContentStreamIndex ()=0
 
virtual PdsContentGetParentContent ()=0
 Gets a reference to the content in 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 TransformCTM (const PdfMatrix *matrix)=0
 
virtual bool MoveToObject (PdsPageObject *ref_obj, bool after, int dst_tag_index, int obj_tag_index)=0
 Moves object within a content to another position. More...
 
virtual bool 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...
 
virtual PdfDocGetDoc ()=0
 Gets a reference to a document object. More...
 
virtual int GetNumEqualTags (PdsPageObject *object)=0
 Count the number of different tags within the marked content of the two page objects. More...
 
virtual int GetOperatorId ()=0
 Get the operator index which construcs the object in the page content. More...
 
virtual int GetContentId ()=0
 Get the content index which identifies it within the tagged or untagged content. More...
 
virtual int GetNumContentItemIds ()=0
 Get the number of content item identifiers within all marked contents. More...
 
virtual int GetContentItemId (int level)=0
 
virtual bool RegisterEvent (PdfEventType type, PdsPageObjectEventProc proc, void *data)=0
 Registers a user-supplied procedure to call when the specified event occurs. More...
 
virtual bool UnregisterEvent (PdfEventType type, PdsPageObjectEventProc proc, void *data)=0
 

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

◆ GetCharCode()

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

Gets the text of one character of the text.

Parameters
indexThe index of a character.
Returns
Charcode of the characted

◆ 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 ( 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 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.