GetBarcodeWidth
类别 向量图形、页面布局
描述
根据条形码中最窄条的宽度返回条形码总宽度
语法
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);
参数
| NominalWidth | 条码中最窄条的所需宽度 |
|---|---|
| Text | 条码数据 |
| Barcode | 1 = Code39(或 Code 3 of 9);2 = EAN-13;3 = Code128;4 = PostNet;5 = Interleaved 2 of 5 |
返回值
返回给定标称宽度下条码占用的宽度,已转换为当前度量单位;Barcode 超出 1–5 或 Text 未通过码制校验时返回 0