DL Logo

PDETextItem Functions

PDETextItemCopyText

Header: PERProcs.h:2628

Description

Copies the text from a text item element into a character buffer.

Syntax

ASUns32 PDETextItemCopyText(IN PDETextItem textItem, OUT ASUns8 *buffer, IN ASUns32 bufferSize);

Parameters

textItem
A pointer to the characters to add. Note that passing NULL for text can invalidate the text object but will not raise an error. Callers must not pass NULL for this parameter.
buffer
(Filled by the method) A pointer to a buffer in which to store the copy.
bufferSize
The length of the text buffer in bytes.

Returns

The length in bytes of textItem.

Exceptions

PDETextItemCreate

Header: PEWProcs.h:2417

Description

Superseded by PDETextItemCreateEx() in Acrobat 10.0. Creates a text item element containing a character or text run, which can be added to a PDEText text object.

Call PDERelease() to dispose of the returned PDETextItem object when finished with it.

Syntax

PDETextItem PDETextItemCreate(IN ASUns8 *text, IN ASUns32 textLen, IN PDEFont font, IN PDEGraphicStateP gStateP, IN ASUns32 gStateLen, IN PDETextStateP textStateP, IN ASUns32 textStateLen, IN ASFixedMatrix *textMatrixP);

Parameters

text
A pointer to the characters to add. Note that passing NULL for text can invalidate the text object but will not raise an error. Callers must not pass NULL for this parameter.
textLen
The length of the text in bytes.
font
The font for the element.
gStateP
A pointer to a PDEGraphicStateP structure with the graphics state for the element.
gStateLen
The length of the graphics state for the element.
textStateP
A pointer to a PDETextState structure with the text state for the element. Note that PDFEdit ignores the wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields.
textStateLen
The length of the text state for the element.
textMatrixP
A pointer to an ASFixedMatrix that holds the matrix for the element.

Exceptions

PDETextItemCreateEx

Header: PEWProcs.h:3528

Description

Creates a text item element containing a character or text run, which can be added to a PDEText text object. Supersedes PDETextItemCreate() in Acrobat 10.0.

Call PDERelease() to dispose of the returned PDETextItem object when finished with it.

Syntax

PDETextItem PDETextItemCreateEx(IN ASUns8 *text, IN ASUns32 textLen, IN PDEFont font, IN PDEGraphicStateP gStateP, IN ASUns32 gStateLen, IN PDETextStateP textStateP, IN ASUns32 textStateLen, IN ASDoubleMatrix *textMatrixP);

Parameters

text
A pointer to the characters to add. Note that passing NULL for text can invalidate the text object but will not raise an error. Callers must not pass NULL for this parameter.
textLen
The length of the text in bytes.
font
The font for the element.
gStateP
A pointer to a PDEGraphicStateP structure with the graphics state for the element.
gStateLen
The length of the graphics state for the element.
textStateP
A pointer to a PDETextState structure with the text state for the element. Note that PDFEdit ignores the wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields.
textStateLen
The length of the text state for the element.
textMatrixP
A pointer to an ASDoubleMatrix that holds the matrix for the element.

Exceptions

PDETextItemGetFont

Header: PERProcs.h:2559

Description

Gets the font for a text item.

Note: This method does not change the reference count of the returned PDEFont.

Related Methods

Syntax

PDEFont PDETextItemGetFont(IN PDETextItem textItem);

Parameters

textItem
The text item whose font is obtained.

Returns

The font of the specified text item.

Exceptions

PDETextItemGetGState

Header: PERProcs.h:2645

Description

Gets the graphics state for a text item.

Syntax

void PDETextItemGetGState(IN PDETextItem textItem, OUT PDEGraphicStateP stateP, IN ASUns32 stateSize);

Parameters

textItem
Text item whose graphic state is obtained.
stateP
(Filled by the method) A pointer to a PDEGraphicState structure with graphics state of the text item.
stateSize
The size of the stateP buffer in bytes.

Exceptions

PDETextItemGetGStateEx

Header: PERProcs.h:3339

Description

Gets the graphics state for a text item. This method fills PDEGraphicStateEx as output which is higher precision alternative of PDEGraphicState structure.

Syntax

void PDETextItemGetGStateEx(IN PDETextItem textItem, OUT PDEGraphicStateExP stateP, IN ASUns32 stateSize);

Parameters

textItem
Text item whose graphic state is obtained.
stateP
(Filled by the method) A pointer to a PDEGraphicStateEx structure with graphics state of the text item.
stateSize
The size of the stateP buffer in bytes.

Exceptions

PDETextItemGetTextLen

Header: PERProcs.h:2607

Description

Gets the text length for a text item.

Related Methods

Syntax

ASUns32 PDETextItemGetTextLen(IN PDETextItem textItem);

Parameters

textItem
The text item whose text length is obtained.

Returns

The text length in bytes.

Exceptions

PDETextItemGetTextMatrix

Header: PERProcs.h:2577

Description

Superseded by PDETextItemGetTextMatrixEx() in Acrobat 10.0. Gets the text matrix for a character in a text item.

Syntax

void PDETextItemGetTextMatrix(IN PDETextItem textItem, IN ASUns32 charOffset, OUT ASFixedMatrix *textMatrixP);

Parameters

textItem
The text item.
charOffset
The offset of the character whose text matrix is obtained.
textMatrixP
(Filled by the method) A pointer to a ASFixedMatrix structure with the text matrix of the character.

Exceptions

PDETextItemGetTextMatrixEx

Header: PERProcs.h:3152

Description

Supersedes PDETextItemGetTextMatrix() in Acrobat 10.0. Gets the text matrix for a character in a text item.

Syntax

void PDETextItemGetTextMatrixEx(IN PDETextItem textItem, IN ASUns32 charOffset, OUT ASDoubleMatrix *textMatrixP);

Parameters

textItem
The text item.
charOffset
The offset of the character whose text matrix is obtained.
textMatrixP
(Filled by the method) A pointer to a ASDoubleMatrix structure with the text matrix of the character.

Exceptions

PDETextItemGetTextState

Header: PERProcs.h:2594

Description

Gets the text state of a text item.

Related Methods

Syntax

void PDETextItemGetTextState(IN PDETextItem textItem, OUT PDETextStateP textStateP, IN ASUns32 textStateSize);

Parameters

textItem
The text item whose text state is obtained.
textStateP
(Filled by the method) A pointer to a PDETextStateP structure with text state of the text item.
textStateSize
The size of the texStateP structure in bytes.

Exceptions

PDETextItemRemoveChars

Header: PEWProcs.h:2536

Description

Removes contiguous characters from a text item.

Syntax

void PDETextItemRemoveChars(IN PDETextItem textItem, IN ASUns32 charOffset, IN ASUns32 count);

Parameters

textItem
The text item whose characters are removed.
charOffset
The offset of the first character to remove.
count
The number of characters to remove.

Exceptions

PDETextItemReplaceChars

Header: PEWProcs.h:2519

Description

Replaces characters in a text item.

This method does not change the number of characters in the text item; extra characters are ignored.

Syntax

void PDETextItemReplaceChars(IN PDETextItem textItem, IN ASUns32 charIndex, IN ASUns8 *newChar, IN ASUns32 newCharLen);

Parameters

textItem
The text item whose characters are replaced.
charIndex
The index position of the characters to replace.
newChar
The replacement text.
newCharLen
The number of bytes to replace.

Exceptions

PDETextItemReplaceText

Header: PEWProcs.h:2498

Description

Replaces all of the text in a text item.

Syntax

void PDETextItemReplaceText(IN PDETextItem textItem, IN ASUns8 *newText, IN ASUns32 newTextLen);

Parameters

textItem
The text item whose text are replaced.
newText
The replacement text.
newTextLen
The number of bytes to replace.

Exceptions

PDETextItemSetFont

Header: PEWProcs.h:2435

Description

Sets the font for a text item.

Note: This method decrements the reference count of the previous font and increments the reference count of the new font.

Related Methods

Syntax

void PDETextItemSetFont(IN PDETextItem textItem, IN PDEFont font);

Parameters

textItem
The text item whose font is set.
font
The new font object.

Exceptions

PDETextItemSetGState

Header: PEWProcs.h:2483

Description

Sets the graphics state for a text item.

Syntax

void PDETextItemSetGState(IN PDETextItem textItem, OUT PDEGraphicStateP stateP, IN ASUns32 stateSize);

Parameters

textItem
Text item whose graphics state is set.
stateP
A pointer to a PDEGraphicState structure with graphics state of the text item.
stateSize
The size of the stateP buffer in bytes.

Exceptions

PDETextItemSetGStateEx

Header: PEWProcs.h:3824

Description

Sets the graphics state for a text item. This method takes pointer to PDEGraphicStateEx as input which is higher precision alternative of PDEGraphicState structure.

Syntax

void PDETextItemSetGStateEx(IN PDETextItem textItem, OUT PDEGraphicStateExP stateP, IN ASUns32 stateSize);

Parameters

textItem
Text item whose graphics state is set.
stateP
A pointer to a PDEGraphicStateEx structure with graphics state of the text item.
stateSize
The size of the stateP buffer in bytes.

Exceptions

PDETextItemSetTextMatrix

Header: PEWProcs.h:2452

Description

Superseded by PDETextItemSetTextMatrixEx() in Acrobat 10.0. Sets the text matrix for a text item.

Syntax

void PDETextItemSetTextMatrix(IN PDETextItem textItem, IN ASFixedMatrix *textMatrixP);

Parameters

textItem
The text item whose text matrix is set.
textMatrixP
A pointer to a ASFixedMatrix structure with the new text matrix of the text item.

Exceptions

PDETextItemSetTextMatrixEx

Header: PEWProcs.h:3547

Description

Sets the text matrix for a text item. Supersedes PDETextItemSetTextMatrix() in Acrobat 10.0.

Syntax

void PDETextItemSetTextMatrixEx(IN PDETextItem textItem, IN ASDoubleMatrix *textMatrixP);

Parameters

textItem
The text item whose text matrix is set.
textMatrixP
A pointer to a ASDoubleMatrix structure with the new text matrix of the text item.

Exceptions

PDETextItemSetTextState

Header: PEWProcs.h:2467

Description

Sets the text state for a text item.

Related Methods

Syntax

void PDETextItemSetTextState(IN PDETextItem textItem, IN PDETextStateP textStateP, IN ASUns32 textStateSize);

Parameters

textItem
The text item whose text state is set.
textStateP
A PDETextStateP structure with the new text state of the text item.
textStateSize
The size of the textStateP structure in bytes.

Exceptions