API referenceDigital Signatures

pdfGetSignProcessByteRange

Read back one of the four /ByteRange values computed by

C
int32_t __stdcall pdfGetSignProcessByteRange(PPDF IPDF, int32_t SignProcessID, int32_t ArrayPosition);
int32_t __stdcall pdfGetSignProcessResult(PPDF IPDF, int32_t SignProcessID);
Delphi
function pdfGetSignProcessByteRange(const IPDF: PPDF; SignProcessID, ArrayPosition: Integer): Integer; stdcall;
function pdfGetSignProcessResult(const IPDF: PPDF; SignProcessID: Integer): Integer; stdcall;

Purpose. Read back one of the four /ByteRange values computed by the most recent signing operation, and the current sign-process state.

Description. Ignored parameter, both functions: SignProcessID is accepted by the ABI but never used — the real backing (GetSignByteRangeVal/GetSignProcResult) reads a single, document-wide FSigByteRange/FSigProcState with no per-process indexing at all. This confirms there is only ever one tracked sign process per document at a time — the SignProcessID parameter exists in the ABI as if multiple concurrent/historical sign processes could be distinguished, but in practice a second pdfCloseAndSignFileExt call simply overwrites the first's tracked state regardless of what ID value is passed. pdfGetSignProcessByteRange additionally requires FSigProcState >= 1 (a sign process has been prepared) and ArrayPosition in 0..3 (the four /ByteRange numbers).

Parameters.

ParameterDescription
IPDFDocument handle.
SignProcessIDAccepted but never used — there is only one document-wide tracked sign process.
ArrayPosition0..3, selecting one of the four /ByteRange array values.

Return value. pdfGetSignProcessByteRange: the requested /ByteRange value; -1 if no sign process has been prepared yet or ArrayPosition is out of range. pdfGetSignProcessResult: 0 = none, 1 = prepared (deferred sign in progress), 2 = finished.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetSignProcessByteRange(IntPtr IPDF, int SignProcessID, int ArrayPosition);
Area
Digital Signatures
Category

Getters

Exported names

pdfGetSignProcessByteRange

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.