API referenceCore SDK

pdfCopyChoiceValues

Copy a Choice-type form field's (/Ch, listbox/combobox)

C
BOOL32 __stdcall pdfCopyChoiceValues(PPDF IPDF, uint32_t Source, uint32_t Dest, BOOL32 Share);
Delphi
function pdfCopyChoiceValues(const IPDF: PPDF; Source, Dest: Cardinal; Share: LongBool): LongBool; stdcall;

Purpose. Copy a Choice-type form field's (/Ch, listbox/combobox) /Opt export-value list from one field to another — useful for keeping several fields with identical option lists in sync without redefining the list per field.

Parameters.

ParameterDescription
IPDFDocument handle.
Source, DestField handles.
ShareWhether the two fields should reference the shared /Opt array object (True) or receive independent copies (False) — not independently re-verified in this chapter beyond confirming the parameter reaches CopyChoiceValues.

Return value. True if both fields resolve and are Choice-type; False otherwise.

C# (P/Invoke)

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

Core

Exported names

pdfCopyChoiceValues

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.