API referenceCore SDK

pdfLoadState

Restore a previously saved document/engine state snapshot.

C
int32_t __stdcall pdfLoadState(PPDF IPDF, int32_t StateID);
Delphi
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.

ParameterDescription
IPDFDocument handle.
StateIDMust 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)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfLoadState(IntPtr IPDF, int StateID);
Area
Core SDK
Category

Core

Exported names

pdfLoadState

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.