/*
Type your code here. The encoder object is already instantiated.
And you do not need to call the encode() method at the end.
*/
encoder
.initialize()
.codepage('auto')
.line('Hello World!')
.newline();
encoder
.initialize()
.codepage('auto')
.line(model)
.rule()
.line('Text')
.newline()
.line('Font A')
.line('48═════════════════════════════════════════════╣')
.line('44═════════════════════════════════════════╣')
.line('42═══════════════════════════════════════╣')
.line('35════════════════════════════════╣')
.line('32═════════════════════════════╣')
.newline()
.font('A')
.line('Font B')
.font('B')
.line('64═════════════════════════════════════════════════════════════╣')
.line('56═════════════════════════════════════════════════════╣')
.line('48═════════════════════════════════════════════╣')
.line('42═══════════════════════════════════════╣')
.newline()
.font('A')
.text('The quick brown fox jumps over the lazy dog. ')
.italic()
.text('The quick brown fox jumps over the lazy dog. ')
.italic()
.text('The quick brown fox jumps over the lazy dog. ')
.bold()
.text('The quick brown fox jumps over the lazy dog. ')
.bold()
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox ')
.size(2, 2)
.text('jumps')
.size(1, 1)
.text(' over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('€. ')
.newline()
.newline()
.size(2, 2)
.text('The quick brown fox jumps over the lazy dog. ')
.size(1, 1)
.newline()
encoder
.align('center').invert().text('Inverted &').invert().align('left').newline()
.align('center').text('Centered!').align('left').newline()
.newline()
encoder
.box(
{ width: encoder.columns - 10, align: 'center', style: 'single', marginLeft: 10 },
'The quick brown fox jumps over the lazy dog'
)
.newline()
encoder
.box(
{ width: encoder.columns - 10, align: 'right', style: 'double' },
(encoder) => encoder
.text('The quick brown ')
.height(2)
.text('fox')
.height(1)
.text(' jumps over the lazy dog')
)
.newline()
.rule({ style: 'double' })
.newline()
.rule({ style: 'single' })
.newline()
.align('center')
.rule({ style: 'single', width: 10 })
.align('left')
.newline()
encoder
.rule({ style: 'single' })
.line('ξεσκεπάζω την ψυχοφθόρα βδελυγμία. ξεσκεπάζω την ψυχοφθόρα βδελυγμία. ξεσκεπάζω την ψυχοφθόρα βδελυγμία.')
.rule({ style: 'single' })
.line('Я можу їсти скло, і воно мені не зашкодить. Я можу їсти скло, і воно мені не зашкодить.')
.rule({ style: 'single' })
.line('くうこうから ホテルまで くるまで 1じかんぐらいです。')
.rule({ style: 'single' })
.line('أنا قادر على أكل الزجاج و هذا لا يؤلمني.')
.rule({ style: 'single' })
.line('אני יכול לאכול זכוכית וזה לא מזיק לי.')
.rule({ style: 'single' })
.line('ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ')
.rule({ style: 'single' })
.line('Pchnąć w tę łódź jeża lub ośm skrzyń fig')
.rule({ style: 'single' })
.line('Árvíztűrő tükörfúrógép')
.rule({ style: 'single' })
.newline();
encoder
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.newline()
.newline()
.font('B')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.newline()
.newline()
.font('A')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.text('The quick brown fox jumps over the lazy dog. ')
.newline()
.newline()
encoder
.newline()
.newline()
.newline()
.newline()
.newline()
.newline()
.line('How many lines do we need to feed before we cut?')
.line('8 ----------------------------')
.line('7 ----------------------------')
.line('6 ----------------------------')
.line('5 ----------------------------')
.line('4 ----------------------------')
.line('3 ----------------------------')
.line('2 ----------------------------')
.line('1 ----------------------------')
.line('0 Last line, cut below! ------')
.cut()
.newline()
.newline()
encoder
.initialize()
.codepage('auto')
.line(model)
.rule()
.line('Tables')
.newline()
let widePaper = encoder.columns >= 42
if (!widePaper) {
encoder.font('B');
}
encoder.table(
[
{ width: 15, align: 'left', marginRight: 1 },
{ width: 9, align: 'left', marginRight: 1 },
{ width: 16, align: 'right' }
],
[
[
(encoder) => encoder.bold(true).text('Name').bold(false),
(encoder) => encoder.bold(true).text('Quantity').bold(false),
(encoder) => encoder.bold(true).text('Description').bold(false)
],
[
(encoder) => encoder.rule({ width: 6 }),
(encoder) => encoder.rule(),
(encoder) => encoder.rule({ style: 'double' }),
],
['Banana', '5', 'Ripe Yellow Bananas'],
['Cherry', '250000000', 'Delicious Sweet Cherries'],
[
(encoder) => encoder.text('Cherry'),
(encoder) => encoder.width(2).text('250000000').width(1),
(encoder) => encoder.text('Delicious Sweet Cherries')
],
[
(encoder) => encoder.bold(true).text('Cherry').bold(false),
(encoder) => encoder.text('250000000'),
(encoder) => encoder.bold(true).text('Delicious Sweet Cherries').bold(false)
],
['[-------------]', '[-------]', '[--------------]']
]
)
if (!widePaper) {
encoder.font('A');
}
encoder.newline()
const firstColumnWidth = Math.round(encoder.columns * 0.1);
const secondColumnWidth = Math.round(encoder.columns * 0.5);
encoder
.width(2)
.line("-".repeat(encoder.columns / 2))
.width(1);
encoder.table(
[
{ width: firstColumnWidth, marginRight: 1, align: "right" },
{ width: secondColumnWidth, align: "left" },
{
width: encoder.columns - firstColumnWidth - secondColumnWidth - 1,
align: "right",
},
],
[
["1x", "Spaghetti Bolognese", "€ 10,00"],
["10x", "Spagetti alla carbonara", "€ 100,00"],
],
);
encoder
.width(2)
.line("-".repeat(encoder.columns / 2))
.width(1);
encoder
.initialize()
.codepage('auto')
.line(model)
.rule()
.line('Images')
.newline()
const image = new Image();
image.src ='data:image/png;base64,iVBORw0KGgoAA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NWvG8PKo7ZjRxn3Oav0rtIBrQLSt9Pf3P3n48OEfBmGm7yHAKAGF9uHS8K8RmvSzAuZ8lAeHALAt45Lv744cOfLvQdUaSAQwypw7d+4gIsFpDAVfwLlecz7K/SHA+RWcP4UO9gQWfPb6Hfe92gQyB/BWyP3bbrvtT3CvYC+GhFuj4aARHdkxnY8x//3BwcHdb7/99gGZ9JVLBxoBTHNnzpz59YYNG54HAWJYIxgFCdIREQw6zeVur8/iUu8Hy5Yt+zqu9Q81Jykr1ZII4FUB0eDzeI5wF14ttwMkWEoiRGTwIlS/7zp+git8GO/3Ym71apAhv761gC4DGyud7XjTpk0bLl++/ACiwlYsGq0HCZZ4ieDdn01+oZ2jo03iPrYJjPMn4PifoNf/6NChQ0da6fhq22YnrPzxxx9Pwri1iAqjHB6wrYXzV2PjGkIvyJGG4UlsvJyM45hIabRwXEMtLIUt2jGOY46t4m4wtVyCk/nodg7nLmD/E1zWfYDtKJ7ofWfjxo0nnnvuOfGTvRYqVkU6AlA4NrZly5YBPNfef/78+T5MeFI4l8RxfGJigpeqWk8MIx2hbxW9OXboePRkxbeqIoyX4egKjkuYGBewgJNbtWpVBkvoGZtn+OZoMjodIRAhECEQIRAhECEQIRAhECEQIRAhECEQIRAhECEQIRAhECEQIRAhECEQIRAhMCsCvwOhaCsqUIf9fQAAAABJRU5ErkJggg==';
await image.decode();
encoder
.align('center')
.image(image, 128, 128, 'atkinson')
.align('left')
encoder
.initialize()
.codepage('auto')
.line(model)
.rule()
.line('Barcodes')
.newline()
encoder
.newline()
.line('EAN13:')
.barcode('123456789012', 'ean13', { width: 2 })
.newline()
encoder
.line('EAN8:')
.barcode('12345670', 'ean8', { width: 2 })
.newline()
encoder
.line('UPC-A:')
.barcode('12345678901', 'upca', { width: 2 })
.newline()
encoder
.line('UPC-E:')
.barcode('023456000073', 'upce', { width: 2 })
.newline()
encoder
.line('Code 39:')
.barcode('1234ABCDEF$', 'code39', { width: 1 })
.newline()
encoder
.line('Code 93:')
.barcode('1234ABCDEF', 'code93', { width: 1 })
.newline()
encoder
.line('Code 128 (CODE128):')
.barcode('CODE128', 'code128', { width: 1 })
.line('Code 128 (Code128):')
.barcode('CODE128', 'code128', { width: 1 })
.line('Code 128 (50859935):')
.barcode('50859935', 'code128', { width: 1 })
.newline()
encoder
.line('ITF:')
.barcode('12345678', 'itf', { width: 2 })
.newline()
encoder
.line('Codabar / NW-7:')
.barcode('A1234B', 'codabar', { width: 2 })
.newline()
encoder
.line('GS1-128 (0130012345678906):')
.barcode('0130012345678906', 'gs1-128', { width: 2 })
.line('GS1-128 ((01)30012345678906):')
.barcode('(01)30012345678906', 'gs1-128', { width: 2 })
.newline()
encoder
.line('GS1 Databar Omni:')
.barcode('1234567890123', 'gs1-databar-omni', { width: 2 })
.newline()
encoder
.line('GS1 Databar Truncated:')
.barcode('1234567890123', 'gs1-databar-truncated', { width: 2 })
.newline()
encoder
.line('GS1 Databar Limited:')
.barcode('1234567890123', 'gs1-databar-limited', { width: 2 })
.newline()
encoder
.line('GS1 Databar Expanded:')
.barcode('0130012345678906', 'gs1-databar-expanded', { width: 2 })
.newline()
encoder.rule();
encoder
.newline()
.line('Without checksum:')
.barcode('123456789012', 'ean13', 60)
.newline()
encoder
.newline()
.line('With checksum:')
.barcode('1234567890128', 'ean13', 60)
.newline()
encoder
.newline()
.line('Invalid checksum:')
.barcode('1234567890124', 'ean13', 60)
.newline()
encoder.rule();
encoder
.newline()
.line('{ width: 1 }')
.barcode('123456789012', 'ean13', { width: 1 })
.barcode('12345678', 'itf', { width: 1 })
.newline()
encoder
.newline()
.line('{ width: 2 }')
.barcode('123456789012', 'ean13', { width: 2 })
.barcode('12345678', 'itf', { width: 2 })
.newline()
encoder
.newline()
.line('{ width: 3 }')
.barcode('123456789012', 'ean13', { width: 3 })
.barcode('12345678', 'itf', { width: 3 })
.newline()
encoder.rule();
encoder
.newline()
.line('{ height: 40 }')
.barcode('123456789012', 'ean13', { height: 40 })
.newline()
encoder
.newline()
.line('{ height: 60 }')
.barcode('1234567890128', 'ean13', { height: 60 })
.newline()
encoder
.newline()
.line('{ height: 100 }')
.barcode('1234567890128', 'ean13', { height: 100 })
.newline()
encoder.rule();
encoder
.newline()
.line('{ text: true }')
.barcode('123456789012', 'ean13', { text: true })
.newline()
encoder
.newline()
.line('{ text: true }')
.barcode('1234567890128', 'ean13', { text: true })
.newline()
encoder.rule();
encoder
.newline()
.line('Left aligned:')
.align('left')
.barcode('12345670', 'ean8', 60)
.align('left')
.newline()
encoder
.newline()
.line('Centered:')
.align('center')
.barcode('12345670', 'ean8', 60)
.align('left')
.newline()
encoder
.newline()
.line('Right aligned:')
.align('right')
.barcode('12345670', 'ean8', 60)
.align('left')
.newline()
encoder
.initialize()
.codepage('auto')
.line(model)
.rule()
.line('QR Code')
.newline()
encoder
.line('{}')
.align('center')
.qrcode('https://nielsleenheer.com')
.align('left')
.newline()
.newline()
encoder
.line('{ model: 1 }')
.align('center')
.qrcode('https://nielsleenheer.com', { model: 1 })
.align('left')
.newline()
.newline()
encoder
.line('{ model: 2 }')
.align('center')
.qrcode('https://nielsleenheer.com', { model: 2 })
.align('left')
.newline()
.newline()
encoder
.line('{ size: 4 }')
.align('center')
.qrcode('https://nielsleenheer.com', { size: 4 })
.align('left')
.newline()
.newline()
encoder
.line('{ size: 8 }')
.align('center')
.qrcode('https://nielsleenheer.com', { size: 8 })
.align('left')
.newline()
.newline()
encoder
.line('{ errorlevel: l }')
.align('center')
.qrcode('https://nielsleenheer.com', { errorlevel: 'l' })
.align('left')
.newline()
.newline()
encoder
.line('{ errorlevel: m }')
.align('center')
.qrcode('https://nielsleenheer.com', { errorlevel: 'm' })
.align('left')
.newline()
.newline()
encoder
.line('{ errorlevel: q }')
.align('center')
.qrcode('https://nielsleenheer.com', { errorlevel: 'q' })
.align('left')
.newline()
.newline()
encoder
.line('{ errorlevel: h }')
.align('center')
.qrcode('https://nielsleenheer.com', { errorlevel: 'h' })
.align('left')
.newline()
.newline()
encoder
.initialize()
.codepage('auto')
.line(model)
.rule()
.line('PDF417')
.newline()
encoder
.line('{}')
.align('center')
.pdf417('https://nielsleenheer.com')
.align('left')
.newline()
.newline()
encoder
.line('{ width: 4, height: 4 }')
.align('center')
.pdf417('https://nielsleenheer.com', { width: 4, height: 4 })
.align('left')
.newline()
.newline()
encoder
.line('{ errorlevel: 2 }')
.align('center')
.pdf417('https://nielsleenheer.com', { errorlevel: 2 })
.align('left')
.newline()
.newline()
encoder
.line('{ errorlevel: 4 }')
.align('center')
.pdf417('https://nielsleenheer.com', { errorlevel: 4 })
.align('left')
.newline()
.newline()
encoder
.line('{ columns: 1 }')
.align('center')
.pdf417('https://nielsleenheer.com', { columns: 1 })
.align('left')
.newline()
.newline()
encoder
.line('{ columns: 2 }')
.align('center')
.pdf417('https://nielsleenheer.com', { columns: 2 })
.align('left')
.newline()
.newline()
encoder
.line('{ columns: 3 }')
.align('center')
.pdf417('https://nielsleenheer.com', { columns: 3 })
.align('left')
.newline()
.newline()
encoder
.line('{ columns: 4 }')
.align('center')
.pdf417('https://nielsleenheer.com', { columns: 4 })
.align('left')
.newline()
.newline()