pdfSetDefBitsPerPixel
Set/get a document-global default color bit depth for
int32_t __stdcall pdfGetDefBitsPerPixel(PPDF IPDF);
BOOL32 __stdcall pdfSetDefBitsPerPixel(PPDF IPDF, int32_t Value);
function pdfGetDefBitsPerPixel(const IPDF: PPDF): Integer; stdcall;
function pdfSetDefBitsPerPixel(const IPDF: PPDF; Value: Integer): LongBool; stdcall;
Purpose. Set/get a document-global default color bit depth for images/rendering operations that don't otherwise specify one.
Description. Verified write-only no-op. The setter does validate Value against the 4 legal depths (8/16/24/32 — "reject invalid depths," per an explicit DIFF source comment; an invalid value is silently ignored, prior value retained), but FDefBitsPerPixel (default 24) has no consumer anywhere beyond its own getter — no image-creation, canvas, or rendering code path reads it.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Value | Must be 8/16/24/32 or the call is silently ignored (prior value retained); regardless, never consulted anywhere. |
Return value. Getter: the stored value (default 24); 0 if IPDF invalid. Setter: True if IPDF valid.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetDefBitsPerPixel
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.