pdfSetDecodeMode
Control whether pdfGetObjectToString ([Document Lifecycle, Locking, and Object Introspection](E11_DocumentLifecycleLockingAndObjectIntrospection.md)) returns a
int32_t __stdcall pdfSetDecodeMode(PPDF IPDF, int32_t NewDecodeMode);
function pdfSetDecodeMode(const IPDF: PPDF; NewDecodeMode: Integer): Integer; stdcall;
Purpose. Control whether pdfGetObjectToString (Document Lifecycle, Locking, and Object Introspection) returns a stream object's filter-decoded payload or its raw serialized bytes.
Description. Real and directly wired: per an explicit source comment, "Consumed by GetObjectAsString: mode <> 0 -> pdfGetObjectToString returns the filter-decoded stream payload for stream objects (raw serialization at mode 0)." This is a genuinely useful low-level debugging/introspection toggle, not a no-op like several of this chapter's other document-global settings.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
NewDecodeMode | 0 = raw serialized bytes; non-zero = filter-decoded payload, for pdfGetObjectToString. |
Return value. 1 if IPDF is valid; 0 otherwise.
See also. pdfGetObjectToString.
C# (P/Invoke)
public static extern int pdfSetDecodeMode(IntPtr IPDF, int NewDecodeMode);
Setters
pdfSetDecodeMode
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.