GetBarcodeWidth

Vector graphics, Page layout

Description

Returns the total width of a barcode based on the width of the smallest bars in the barcode.

Syntax

Delphi

Function TPDFlib.GetBarcodeWidth(NominalWidth: Double; Const Text: WideString; Barcode: Integer): Double;

ActiveX

Function PDFlib::GetBarcodeWidth(NominalWidth As Double, Text As String, Barcode As Long) As Double

DLL

double DLGetBarcodeWidth(int InstanceID, double NominalWidth, const wchar_t* Text, int Barcode);
double DLGetBarcodeWidthA(int InstanceID, double NominalWidth, const char* Text, int Barcode);

Parameters

NominalWidthThe desired width of the narrowest bars in the barcode
TextThe barcode data
Barcode1 = Code39 (or Code 3 of 9) 2 = EAN-13 3 = Code128 4 = PostNet 5 = Interleaved 2 of 5

Return values

Returns the width the barcode occupies for the given nominal width, converted to the current measurement units; returns 0 when Barcode is outside 1–5 or Text fails the symbology's validation