API referenceCore SDK

psrGetOpStructSize

Return the byte size of a given operator's Param struct —

C
int32_t __stdcall psrGetOpStructSize(int32_t OpCode);
Delphi
function psrGetOpStructSize(OpCode: Integer): Integer; stdcall;

Purpose. Return the byte size of a given operator's Param struct — a pure static metadata lookup taking no context or document parameter at all, used by callers marshalling TPDFOperator records directly (e.g. via the Funcs/UserData low-level callback path of psrParsePage/pdfParseContent).

Description. A fixed case OpCode of table mapping each operator code to SizeOf(...) of its corresponding record type; 0 for control operators (e.g. q/Q) that carry no parameters at all. Per an inline comment, these sizes were "verified to match a C compiler's sizeof by the G-09 layout harness" — i.e. cross-checked for binary ABI compatibility with C callers, not just internally consistent within Pascal.

Parameters.

ParameterDescription
OpCodeThe operator code to query.

Return value. The Param struct's byte size; 0 for unrecognized or parameter-less operator codes.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int psrGetOpStructSize(int OpCode);
Area
Core SDK
Category

Misc

Exported names

psrGetOpStructSize

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.