DynaPDF Manual - Page 686
Previous Page 685 Index Next Page 687

Function Reference
Page 686 of 860
ReplacePageTextEx
Syntax:
LBOOL pdfReplacePageTextEx(
const PPDF* IPDF,
// Instance pointer
const char* NewText,
// New text or NULL to delete the string
struct TPDFStack* Stack) // Operation stack
The function deletes or replaces a text string of a content stream that was found by the function
GetPageText() beforehand. The function requires a font that must be set with SetFont() or
SetFontEx() before calling this function. The new text is internally written with the function
WriteTextMatrixEx().
This function changes certain members of the graphics state such as the fill and stroke color, the
color space and the text draw mode. If further contents must be written to the file make sure that the
color space, text draw mode, and the wished fill and stroke color is initialized with the wished
values before writing new contents to the file.
DynaPDF is delivered with the example edit_text which demonstrates how texts can be replaced in
a document. If you want to develop a text replacement algorithm please take a look into this
example.
Remarks:
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ResetAnnotAP
Syntax:
LBOOL pdfResetAnnotAP(
const PPDF* IPDF, // Instance pointer
SI32 Handle)
// Annotation handle or -1
The function forces a rebuild of the appearance stream of the specified annotation. If Handle is set to
-1 all annotation appearances will be rebuild. This function be useful if an imported annotation has
an invalid or empty appearance stream.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: ReplacePageText
Next topic: ResetEncryptionSettings, ResetLineDashPattern