DrawRMQRCode

Small Business、條碼

需要 Small Business 版本。在 Delphi、C++Builder 與 Lazarus 程式碼中,請以 TPDFlibSmallBusiness(PDFlibSmallBusiness 單元)或 TPDFlibEnterprise 建立程式庫;Small Business 與 Enterprise DLL 及 ActiveX 組建原樣提供。Single 版本保留此方法,方法會傳回 0,並將 LastErrorCode 設為 901(PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

描述

使用專業編碼器執行環境繪製矩形 Micro QR Code

語法

Delphi

Function TPDFlib.DrawRMQRCode(Left, Top, Width, Height: Double; Const Text: WideString; ECLevel, Version: Integer): Integer; Virtual;

ActiveX

Function PDFlib::DrawRMQRCode(Left As Double, Top As Double, Width As Double, Height As Double, Text As String, ECLevel As Long, Version As Long) As Long

DLL

int DLDrawRMQRCode(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t* Text, int ECLevel, int Version);
int DLDrawRMQRCodeA(int InstanceID, double Left, double Top, double Width, double Height, const char* Text, int ECLevel, int Version);

參數

Left符號方框左下角的水平座標,以目前量測單位計
Top符號方框左下角的垂直座標,以目前量測單位計
Width指定方框的寬度,以目前量測單位計;必須為正的有限值
Height指定方框的高度,以目前量測單位計;必須為正的有限值
TextrMQR 承載資料;容納不下所選尺寸的資料會被拒絕
ECLevel錯誤更正等級:0 為 M,1 為 H
Version0 表示自動選定尺寸;1 至 32 指定固定的矩形版本

傳回值

1符號已編碼並繪製於所選頁面
0未繪製任何內容;LastErrorCode 為 904 表示輸入或幾何無效,903 表示編碼器執行環境無法使用或不相容,901 表示此實例未提供 Small Business 版

ECLevel 為 0 表示 M、1 表示 H;Version 為 0 表示自動選定尺寸,1 至 32 表示固定的矩形尺寸;後端會拒絕容納不下的資料

所選符號會依比例放入方框,方框以目前量測單位計;位置與大小由呼叫端決定

PDF.DrawRMQRCode(50, 700, 180, 50, 'Shipment 12345', 0, 0);

成功傳回 1,失敗傳回 0;專業條碼 說明版本需求、部署與錯誤