psrGetOpStructSize
Return the byte size of a given operator's Param struct —
int32_t __stdcall psrGetOpStructSize(int32_t OpCode);
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.
| Parameter | Description |
|---|---|
OpCode | The operator code to query. |
Return value. The Param struct's byte size; 0 for unrecognized or parameter-less operator codes.
C# (P/Invoke)
public static extern int psrGetOpStructSize(int OpCode);
Misc
psrGetOpStructSize
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.