API referenceForms

pdfGetXFAFormFieldBorderPresence

Get/set a template field's border/edge presence

C
const char*    __stdcall pdfGetXFAFormFieldBorderPresenceA(PPDF IPDF, const char* Name);
const wchar_t* __stdcall pdfGetXFAFormFieldBorderPresenceW(PPDF IPDF, const wchar_t* Name);
int32_t __stdcall pdfSetXFAFormFieldBorderPresenceA(PPDF IPDF, const char* Name, const char* Presence);
int32_t __stdcall pdfSetXFAFormFieldBorderPresenceW(PPDF IPDF, const wchar_t* Name, const wchar_t* Presence);
Delphi
function pdfGetXFAFormFieldBorderPresenceA(const IPDF: PPDF; Name: PAnsiChar): PAnsiChar; stdcall;
function pdfGetXFAFormFieldBorderPresenceW(const IPDF: PPDF; Name: PWideChar): PWideChar; stdcall;
function pdfSetXFAFormFieldBorderPresenceA(const IPDF: PPDF; Name, Presence: PAnsiChar): Integer; stdcall;
function pdfSetXFAFormFieldBorderPresenceW(const IPDF: PPDF; Name, Presence: PWideChar): Integer; stdcall;

Purpose. Get/set a template field's border/edge presence attribute (XFA's visible/hidden/inactive/invisible edge-display toggle).

Description. Same <field> → <border> → <edge> chain as the color function above, reading/writing the edge element's presence attribute directly (no value translation). Defaults to 'visible' if the field has a border/edge chain but no explicit presence attribute — matching the XFA spec default — but returns empty if the field itself, or its border/edge chain, doesn't exist at all (these two "no value" cases are otherwise indistinguishable from the API alone).

Parameters.

ParameterDescription
IPDFDocument handle.
NameThe template field's name attribute.
Presence*(Set only)* New presence string, written verbatim.

Return value. Getter: the presence string ('visible' default, or empty if unresolvable). Setter: 1 on success (creates the border/edge chain if missing); 0 if Name doesn't resolve.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern IntPtr pdfGetXFAFormFieldBorderPresenceW(IntPtr IPDF, IntPtr Name);
public static extern IntPtr pdfGetXFAFormFieldBorderPresence(IntPtr IPDF, IntPtr Name);
public static extern IntPtr pdfGetXFAFormFieldBorderPresenceA(IntPtr IPDF, IntPtr Name);
Area
Forms
Category

Getters

Exported names

pdfGetXFAFormFieldBorderPresenceW pdfGetXFAFormFieldBorderPresence pdfGetXFAFormFieldBorderPresenceA

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.