pdfGetFieldBorderColor
Set/get the /MK /BG (background), /MK /BC (border), and
uint32_t __stdcall pdfGetFieldBackColor(PPDF IPDF);
BOOL32 __stdcall pdfSetFieldBackColor(PPDF IPDF, uint32_t AColor);
uint32_t __stdcall pdfGetFieldBorderColor(PPDF IPDF);
BOOL32 __stdcall pdfSetFieldBorderColor(PPDF IPDF, uint32_t AColor);
uint32_t __stdcall pdfGetFieldTextColor(PPDF IPDF);
BOOL32 __stdcall pdfSetFieldTextColor(PPDF IPDF, uint32_t Color);
function pdfGetFieldBackColor(const IPDF: PPDF): Cardinal; stdcall;
function pdfSetFieldBackColor(const IPDF: PPDF; AColor: Cardinal): LongBool; stdcall;
function pdfGetFieldBorderColor(const IPDF: PPDF): Cardinal; stdcall;
function pdfSetFieldBorderColor(const IPDF: PPDF; AColor: Cardinal): LongBool; stdcall;
function pdfGetFieldTextColor(const IPDF: PPDF): Cardinal; stdcall;
function pdfSetFieldTextColor(const IPDF: PPDF; Color: Cardinal): LongBool; stdcall;
Purpose. Set/get the /MK /BG (background), /MK /BC (border), and /DA text colors of the most recently created field — see the chapter-level cursor note above.
Description. Each setter both writes the color to the actual field (SetFieldColorH(FCurrentFieldHandle, ...)) and caches it in a separate shadow field (FCurFieldBackColor/BorderColor/TextColor), per an explicit DIFF comment ("also stores state") — the getters read back from these cached shadow fields, not by re-querying the field itself, so if the field's color were somehow changed through another path (e.g. pdfSetFieldColor on the same handle), these getters would report the stale cached value rather than the field's current true color.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
AColor/Color | *(Set only)* Packed color, applied to the most-recently-created field. |
Return value. Getters: the cached color; 0 if IPDF invalid or no field has been created yet. Setters: True if IPDF valid.
See also. pdfGetFieldColor (the explicit- handle equivalent, for targeting any field).
C# (P/Invoke)
public static extern uint pdfGetFieldBorderColor(IntPtr IPDF);
Forms
pdfGetFieldBorderColor
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.