Pdf - PdfBarcodeTextEncoding
18 Nov 20261 minute to read
Specifies the byte conversion used by byte segments.
// Create a new PDF document
let document: PdfDocument = new PdfDocument();
// Add a page to the document
let page: PdfPage = document.addPage();
// Create a QR barcode encoded as ISO-8859-1 bytes
let barcode: PdfQRBarcode = new PdfQRBarcode('https://www.syncfusion.com');
barcode.textEncoding = PdfBarcodeTextEncoding.Iso88591;
barcode.draw(page, { x: 40, y: 40, width: 32, height: 32 });
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
Iso88591- Specifies that the text is encoded as ISO-8859-1 bytes;
characters outside the ISO-8859-1 range are rejected. -
Utf8- Specifies that the text is encoded as UTF-8 bytes.