API referenceGraphics

pdfGetBarcodeDict

Read back the caption text of a barcode-bearing form field,

C
BOOL32 __stdcall pdfGetBarcodeDict(void* IBarcode, TPDFBarcode* Barcode);
Delphi
function pdfGetBarcodeDict(const IBarcode: Pointer; var Barcode: TPDFBarcode): LongBool; stdcall;

Purpose. Read back the caption text of a barcode-bearing form field, through a previously-minted IBarcode object handle.

Description. IBarcode is not a barcode created via pdfInsertBarcode — it is an object-descriptor handle exposed on a form field record (Field.IBarcode, minted with kind odBarcode when a barcode-bearing field is enumerated), used specifically by the barcode form field mechanism (pdfCreateBarcodeField, a widget field with a QR of its caption drawn on-page) rather than the standalone pdfInsertBarcode drawing call. TPDFBarcode itself is deliberately minimal — only StructSize, CaptionA, and CaptionW — so this getter's job is limited to resolving the field's caption string (via GetBarcodeCaptionH) into both ANSI and Wide buffers owned by the descriptor; there is no way to recover the symbology type, error-correction level, or other TPDFBarcode2-style geometry through this call, since none of that exists in the smaller TPDFBarcode struct.

Parameters.

ParameterDescription
IBarcodeA barcode-field object handle, as exposed via a field-info struct's IBarcode member (not a handle returned by pdfInsertBarcode).
BarcodeOutput: CaptionA/CaptionW are filled; there are no other fields to fill.

Return value. True if IBarcode resolved to a valid descriptor; False otherwise (this path is logged as "not implemented" internally when the descriptor fails to resolve, though the ABI-level failure is indistinguishable from a "not found" case).

See also. pdfInsertBarcode (a separate, standalone-drawing mechanism with no matching getter of its own).

C# (P/Invoke)

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

Getters

Exported names

pdfGetBarcodeDict

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.