DetectPageBarcodesJSONA

條碼辨識、文件檢查、描繪

描述

DetectPageBarcodesJSON 的 ANSI 版本

字串參數接受 ANSI 文字,其餘行為與寬字元字串版本完全相同

語法

Delphi

Function TPDFlib.DetectPageBarcodesJSON(Page: Integer;
  Left, Top, Width, Height, DPI: Double; Formats: Integer= 0;
  Options: Integer= 0; MaxResults: Integer= 32): WideString;

ActiveX

Function PDFlib::DetectPageBarcodesJSON(Page As Long,
  Left As Double, Top As Double, Width As Double, Height As Double,
  DPI As Double, Formats As Long, Options As Long,
  MaxResults As Long) As String

DLL

const wchar_t* DLDetectPageBarcodesJSON(int InstanceID, int Page,
  double Left, double Top, double Width, double Height, double DPI,
  int Formats, int Options, int MaxResults);
const char* DLDetectPageBarcodesJSONA(int InstanceID, int Page,
  double Left, double Top, double Width, double Height, double DPI,
  int Formats, int Options, int MaxResults);

傳回值

傳回 JSON 物件,包含頁面、有效 DPI、請求區域、結果數量,以及帶有 formatName、text、內容類型、符號系統識別碼、糾錯等級、方向、有效性旗標、四個頁面空間角點與邊界的結果物件

驗證、渲染、後端載入或辨識失敗時傳回空字串

備註

此方法只把請求的區域渲染到一張有大小上限的由上而下 BGR 點陣圖,並在傳回前還原先前所選的頁面

請依處理程序架構,把 PDFlibBarcode32.dll 或 PDFlibBarcode64.dll 部署在主執行檔、PDFlib DLL 或 ActiveX 模組旁;PDFLIB_BARCODE_READER 可指定替代的後端絕對路徑

LastErrorCode 為 115 表示頁面、幾何、遮罩、解析度或限制無效,519 表示渲染、後端或辨識失敗

另請參閱

RenderPageRegionToFile, DrawBarcode, LastErrorCode