API referenceForms

pdfRemoveFormFieldChoiceSub

Remove a Choice-field /Opt entry by its export-value name

C
int32_t __stdcall pdfRemoveFormFieldChoiceSubA(PPDF IPDF, int32_t Index, const char* SubName);
int32_t __stdcall pdfRemoveFormFieldChoiceSubW(PPDF IPDF, int32_t Index, const wchar_t* SubName);
Delphi
function pdfRemoveFormFieldChoiceSubA(const IPDF: PPDF; Index: Integer; SubName: PAnsiChar): Integer; stdcall;
function pdfRemoveFormFieldChoiceSubW(const IPDF: PPDF; Index: Integer; SubName: PWideChar): Integer; stdcall;

Purpose. Remove a Choice-field /Opt entry by its export-value name (SubName) — note Index here addresses the field itself (matching this SDK's frequent Index-actually-means-Handle naming, already confirmed for pdfSetAnnotIntProperty et al., Annotation Appearance and Properties), not the option position within /Opt.

Return value. Non-zero if SubName was found on that field and removed; 0 otherwise.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfRemoveFormFieldChoiceSubW(IntPtr IPDF, int Index, IntPtr SubName);
public static extern int pdfRemoveFormFieldChoiceSub(IntPtr IPDF, int Index, IntPtr SubName);
public static extern int pdfRemoveFormFieldChoiceSubA(IntPtr IPDF, int Index, IntPtr SubName);
Area
Forms
Category

Core

Exported names

pdfRemoveFormFieldChoiceSubW pdfRemoveFormFieldChoiceSub pdfRemoveFormFieldChoiceSubA

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.