DetectPageBarcodesJSON

Barcode recognition, document inspection, rendering

คำอธิบาย

จำแนกบาร์โค้ดหนึ่งมิติกับสองมิติที่รองรับในทั้งหน้าหรือพื้นที่จำกัดบนหน้า แล้วคืนค่า JSON แบบ deterministic พร้อมเนื้อหาที่ถอดรหัสแล้วกับเรขาคณิตในพื้นที่หน้า

ไวยากรณ์

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);

พารามิเตอร์

Pageหมายเลขหน้าโดยนับจาก 1
Left, Topจุดกำเนิดของพื้นที่ หน่วยพอยต์ user-space ของหน้า วัดจากมุมบนซ้าย
Width, Heightขนาดพื้นที่ หน่วยพอยต์ user-space ของหน้า, ตั้งค่าพื้นที่ทั้งสี่เป็นศูนย์เพื่อสแกนทั้งหน้า
DPIความละเอียดเรนเดอร์ตั้งแต่ 24 ถึง 2400 หลังใช้ RenderScale, ศูนย์เลือก 300 DPI
FormatsA mask of PDF_BARCODE_FORMAT_* constants; zero selects PDF_BARCODE_FORMAT_ANY
OptionsA mask of PDF_BARCODE_TRY_HARDER, PDF_BARCODE_PURE, PDF_BARCODE_RETURN_ERRORS, PDF_BARCODE_DISABLE_ROTATE, PDF_BARCODE_DISABLE_INVERT, and PDF_BARCODE_DISABLE_DOWNSCALE
MaxResultsจำนวนผลลัพธ์สูงสุดตั้งแต่ 1 ถึง 255

ค่าที่ส่งคืน

คืนค่า JSON object ที่มีหน้า, DPI ที่มีผล, พื้นที่ที่ขอ, จำนวนผลลัพธ์ และวัตถุผลลัพธ์พร้อม formatName, text, content type, symbology identifier, error-correction level, ทิศทาง, แฟล็กความถูกต้อง มุมสี่จุดในพื้นที่หน้า และกรอบขอบเขตคืนค่าสตริงว่างเมื่อการตรวจ เรนเดอร์ โหลดแบ็กเอนด์ หรือการจดจำ ล้มเหลว

Remarks

เมธอดนี้เรนเดอร์เฉพาะพื้นที่ที่ขอลงบิตแมป BGR แบบ top-down ที่จำกัดขนาด และคืนหน้าที่เลือกไว้ก่อนหน้าก่อนจบ วาง PDFlibBarcode32.dll หรือ PDFlibBarcode64.dll ข้าง executable ของ host, DLL ของ PDFlib หรือโมดูล ActiveX ตามสถาปัตยกรรมของโปรเซส, PDFLIB_BARCODE_READER ใช้ระบุพาธแบ็กเอนด์แบบสัมบูรณ์แทนได้

LastErrorCode is 115 for invalid page, geometry, masks, resolution, or limits and 519 for rendering, backend, or recognition failures

ดูเพิ่มเติม

RenderPageRegionToFile, DrawBarcode, LastErrorCode