pdfSetFieldFontEx
Nominally: associate a specific, already-loaded document font
| Category | Form field fonts |
|---|---|
| Note | Handle is completely ignored (see Remarks) |
Purpose — Nominally: associate a specific, already-loaded document font (by handle) with a field, at a given size.
Description — the signature promises more than the implementation does. Despite taking a Handle parameter (presumably meant to reference a font entry from pdfSetFont/pdfLoadFont, analogous to how pdfChangeFontEx works for page text), this call only sets the field's font size — it calls the exact same SetFieldFontSizeH as pdfSetFieldFontSize and never reads Handle at all. There is no code path in this build that assigns a specific document font handle to a field's /DA — only a font *name* via pdfSetFieldFont.
Declarations
BOOL32 __stdcall pdfSetFieldFontEx(PPDF IPDF, uint32_t Field, uint32_t Handle, double FontSize);
function pdfSetFieldFontEx(const IPDF: PPDF; Field, Handle: Cardinal; FontSize: double): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Field | Cardinal | Target field handle. |
Handle | Cardinal | Accepted but not read — see Description. |
FontSize | Double | New font size. |
Return value — Same as pdfSetFieldFontSize (this call is that function under a different name, with an inert extra parameter).
See also — pdfSetFieldFont (the call that actually sets the font *name*)
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Forms
pdfSetFieldFontEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.