API referenceFonts

pdfSetFieldFontEx

Nominally: associate a specific, already-loaded document font

CategoryForm field fonts
NoteHandle 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

C
BOOL32 __stdcall pdfSetFieldFontEx(PPDF IPDF, uint32_t Field, uint32_t Handle, double FontSize);
Delphi
function pdfSetFieldFontEx(const IPDF: PPDF; Field, Handle: Cardinal; FontSize: double): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
FieldCardinalTarget field handle.
HandleCardinalAccepted but not read — see Description.
FontSizeDoubleNew font size.

Return value — Same as pdfSetFieldFontSize (this call is that function under a different name, with an inert extra parameter).

See alsopdfSetFieldFont (the call that actually sets the font *name*)

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Fonts
Category

Forms

Exported names

pdfSetFieldFontEx

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.