int32_t __stdcall pdfLoadState(PPDF IPDF, int32_t StateID);
function pdfLoadState(const IPDF: PPDF; StateID: Integer): Integer; stdcall;
Purpose. Restore a previously saved document/engine state snapshot.
Description. Known limitation: only validates that IPDF is a valid handle and StateID >= 0 — per an explicit source comment, "state snapshots are a follow-up" — no actual state is captured or restored by this call; there is no corresponding pdfSaveState elsewhere in this manual's inventory that produces a real snapshot for this to load either. Treat this as effectively inert beyond its parameter validation.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
StateID | Must be >= 0; not otherwise consulted (no real state exists to select by ID). |
Return value. 1 if IPDF is valid and StateID >= 0; 0 otherwise. Does not indicate that any actual state was restored.
C# (P/Invoke)
public static extern int pdfLoadState(IntPtr IPDF, int StateID);
Core
pdfLoadState
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.