API referenceGraphics

pdfInitBarcode2

Zero-fill and populate Barcode with sensible defaults before

C
BOOL32 __stdcall pdfInitBarcode2(TPDFBarcode2* Barcode);
Delphi
function pdfInitBarcode2(var Barcode: TPDFBarcode2): LongBool; stdcall;

Purpose. Zero-fill and populate Barcode with sensible defaults before the caller sets Text/BarcodeType and passes it to pdfInsertBarcode.

Description. Sets StructSize, BarcodeType := 0 (QR Code), ECLevel := 1 (error-correction level M), Version := -1 (auto), Mask := -1 (auto), QuietZone := 4 modules, ModuleSize := 0 (fit to the Width/Height the caller later passes to pdfInsertBarcode rather than a fixed module pixel size). Text is left nil — the caller must set it before insertion.

Parameters.

ParameterDescription
BarcodeStruct to initialize; a null pointer fails.

Return value. True unless Barcode is a null pointer.

See also. pdfInsertBarcode.

C# (P/Invoke)

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

Core

Exported names

pdfInitBarcode2

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.