SetBarcodePayloadEncoding
Barcodes
Description
Selects how 2D barcode payload text is converted to bytes. Pass the ordinal of a TPDFlibBarcodePayloadEncoding value. Use 0 (bpeSystemANSI) for system ANSI conversion, 1 (bpeUTF8) for raw UTF-8, or 2 (bpeUTF8WithECI) to mark Data Matrix and PDF417 payloads as UTF-8 for compatible barcode readers
In Delphi the same state is assigned directly through the BarcodePayloadEncoding property; this export is the DLL and dylib access path. Neither mode writes an ECI codeword.
Syntax
Delphi
Function DLSetBarcodePayloadEncoding(InstanceID, Encoding: Integer): Integer; Stdcall;
DLL
int DLSetBarcodePayloadEncoding(int InstanceID, int Encoding);
Parameters
| Encoding | 0 = system ANSI code page (default), 1 = UTF-8, 2 = UTF-8 with an ECI marker for Data Matrix and PDF417 |
|---|
Return values
| 0 | The instance handle is invalid or Encoding is out of range; the current mode is unchanged |
|---|---|
| 1 | The payload encoding was applied |