pdfSetTransparentColor
Set/get a document-global "transparent color" value.
BOOL32 __stdcall pdfSetTransparentColor(PPDF IPDF, uint32_t AColor);
uint32_t __stdcall pdfGetTransparentColor(PPDF IPDF);
function pdfSetTransparentColor(const IPDF: PPDF; AColor: Cardinal): LongBool; stdcall;
function pdfGetTransparentColor(const IPDF: PPDF): Cardinal; stdcall;
Purpose. Set/get a document-global "transparent color" value.
Description. Verified write-only no-op, same class as pdfInitColorManagement above: pdfSetTransparentColor stores AColor into FTransparentColor (default $00FFFFFF, i.e. white) and always returns True if the document handle is valid; pdfGetTransparentColor faithfully reads it back. FTransparentColor has exactly these two read/write sites and is never consulted by image drawing, color-key masking (pdfSetColorMask above), or any other rendering path — setting it has no visible effect on output.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
AColor | *(Set only)* Packed color value to store. |
Return value. pdfSetTransparentColor: True if IPDF is valid (does not indicate any actual effect). pdfGetTransparentColor: the last stored value, or the $00FFFFFF default if never set; 0 if IPDF is invalid.
See also. pdfSetColorMask (the mechanism that actually does make image pixels transparent).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetTransparentColor
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.