TPDFBarcodeResults

Barcode recognition, document inspection, rendering

Description

TPDFBarcodeResults is the dynamic array of TPDFBarcodeResult records that PDFReadBarcodes returns and PDFBarcodeResultsJSON serialises. Each record holds the decoded text, the symbology, validity and orientation flags, backend metadata and four corner points in image pixels.

Results come from the built-in reader or from the native backend; which fields are populated depends on the reader that produced them, so check Valid, Format and Position first and treat the metadata strings as optional.

Syntax

Delphi

TPDFBarcodeResults = Array Of TPDFBarcodeResult;

Fields

FormatInteger value of the matching PDF_BARCODE_FORMAT_* constant
FormatNamePrintable symbology name such as QRCode, Aztec, DataMatrix, UPC-A or EAN-13; empty when the reader does not report one
TextDecoded payload text; empty for a diagnostic record that carries only an error
ContentTypeBackend content classification: 0 text, 1 binary, 2 mixed, 3 GS1, 4 ISO 15434 and 5 unknown ECI
SymbologyIdentifierAIM symbology identifier such as ]d1 or ]d2; empty when the reader does not report one
ErrorCorrectionLevelError-correction level of a two-dimensional symbol, for example ECC200; empty for linear symbols or when unreported
OrientationClockwise symbol rotation in image space, in degrees; 0 for an upright or unreported orientation
ValidTrue when the decoder accepted the symbol; diagnostic error records report False
InvertedTrue when the symbol was decoded from inverted pixels, that is light bars on a dark background
MirroredTrue when the symbol was decoded from a mirrored image
HasECITrue when the payload carried ECI designators that select character sets
LineCountDecoder-reported line count; the built-in linear and Data Matrix readers report 1 while the portable QR and Aztec paths leave it 0
PositionFour corner points in image pixel coordinates; the built-in readers order them around the symbol from its origin corner
ErrorTypeBackend error classification attached to a diagnostic record; zero for an ordinary successful decode
ErrorMessageBackend error text attached to a diagnostic record; empty for an ordinary successful decode

Remarks

PDFReadBarcodes limits the array to MaxResults, which must be between 1 and 255; an image with no decodable symbol returns an empty array and still reports success.

The built-in readers fill Format, FormatName, Text, Valid and Position, plus Orientation and ErrorCorrectionLevel for two-dimensional symbols, Inverted, Mirrored and HasECI where they are detected, LineCount for linear and Data Matrix results and SymbologyIdentifier for Data Matrix; ContentType stays 0 (text) and the error fields stay empty.

ErrorType and ErrorMessage describe a decode failure or warning reported by the backend; PDF_BARCODE_RETURN_ERRORS asks the native backend to return such diagnostic records, and the built-in reader leaves both zero and empty.

Position holds image-space pixel coordinates; PDFBarcodeResultsJSON applies the region origin and pixel scale to turn them into page coordinates, so do not add an offset twice.

See also

PDFReadBarcodes, PDFBarcodeResultsJSON, DetectPageBarcodesJSON, GetBarcodeReaderCapabilitiesJSON