THotPDF.ReplaceLoadedPageText Method

 

THotPDF.ReplaceLoadedPageText

THotPDF

 

Top

Rewrites every occurrence of a specified text (Needle) on a specific loaded page with the Replacement text. Returns True if successful, and ReplaceCount receives the number of operand rewrites performed.Needle) on a specific loaded page with Replacement while preserving all untouched content-stream bytes, including whitespace and comments, through the token-preserving edit overlay

 

Delphi syntax:

function ReplaceLoadedPageText(PageIndex: Integer; const Needle, Replacement: UnicodeString; MatchCase: boolean; out ReplaceCount: Integer): boolean;

 

Description

Rewrites every occurrence of a specified text (Needle) on a specific loaded page with the Replacement text. Returns True if successful, and ReplaceCount receives the number of operand rewrites performed.TJ string items, reverse-encodes replacement text through the match-start font, and replaces only the corresponding half-open glyph source spans through THPDFContentStreamAST. Cross-item edits retain intervening kerning numbers, array structure, unmatched prefixes and suffixes, and unrelated operands; ReplaceCount receives the number of complete rewritten matches