| Category | Interactive text editing |
|---|
Purpose — Delete every text-showing operator whose origin point falls inside a rectangle (or the whole page).
Description — Deletes whole Tj/TJ/'/" operators (not partial runs) whose text origin lies in [Area.Left, Area.Right] × [Area.Bottom, Area.Top]; Area=NULL deletes every text-showing operator on the page. Stages the edit on Ctx — does not touch the actual page content until psrWriteToPage is called.
Declarations
BOOL32 __stdcall psrDeleteText(PPDF IPDF, IPSR Ctx, PFltRect Area, TDeleteTextFlags Flags);
function psrDeleteText(const IPDF: PPDF; const Ctx: IPSR; Area: PFltRect; Flags: TDeleteTextFlags): LongBool; stdcall; external 'LumasPdf.dll';
TDeleteTextFlags (from Lumas.Pdf.ApiTypes — only one value is defined):
TDeleteTextFlags = (dtfDefault = 0);
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Ctx | IPSR | A parsed context from psrParsePage. |
Area | PFltRect | Rectangle to delete text within; NULL = whole page. |
Flags | TDeleteTextFlags | Only dtfDefault (0) exists in this build's type — no alternative deletion modes are currently defined. |
Return value — TRUE if the context and document are valid (stages the edit even if zero operators matched — this call does not distinguish "deleted N operators" from "deleted 0"; check the resulting extracted text if you need to know whether anything changed).
See also — psrWriteToPage
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Misc
psrDeleteText
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.