| Category | Interactive text editing |
|---|---|
| Note | Flags/Parms accepted but entirely unused (see Remarks) |
Purpose — Commit the pending edit staged by psrDeleteText or psrReplaceSelText back to the page.
Description — Writes Ctx.EditedContent to the page it was parsed from (Ctx.EditPage), and clears the pending-edit flag on success.
Declarations
BOOL32 __stdcall psrWriteToPage(PPDF IPDF, IPSR Ctx, TOptimizeFlags Flags, POptimizeParams Parms);
function psrWriteToPage(const IPDF: PPDF; const Ctx: IPSR; Flags: TOptimizeFlags; Parms: POptimizeParams): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Ctx | IPSR | Context with a pending edit. |
Flags | TOptimizeFlags | Accepted for ABI compatibility; not read anywhere in this call's implementation — see Remarks. |
Parms | POptimizeParams | Accepted for ABI compatibility; not read anywhere in this call's implementation — see Remarks. |
Return value — TRUE if there was a pending edit and it was written successfully; FALSE if Ctx has no pending edit (HasEdit=False), no valid edit page, or the write fails.
Remarks — compatibility parameters. TOptimizeFlags is a 30-bit enumeration (image conversion, compression, layer flattening, Bates-number removal, and more — the same flag type used by the SDK's document-level optimize/save routines elsewhere). None of it is consulted by this call — psrWriteToPage does exactly one thing: writes the staged edited content bytes back to the page. If your workflow expects any optimization behavior implied by Flags/Parms from this call specifically, it will not happen here.
See also — psrDeleteText, psrReplaceSelText
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Misc
psrWriteToPage
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.