Open mtahir08 opened 6 years ago
@mtahir08 did you got a solution for this
@VyankeshH I did it using escpos-xml package. https://www.npmjs.com/package/escpos-xml
But now I am facing issue in auto cut paper.
undefined is not a function(evaluating '_escposXml.EscPos.getBufferXML(xml)') I got this type of error when I am trying with this library.Do you have any solution for this??
@mtahir08 did you got qrcode using this.
import { EscPos } from 'escpos-xml';
const xml = `
<?xml version="1.0" encoding="UTF-8"?>
<document>
<line-feed />
<align mode="center">
<bold>
<text-line size="1:0">{{name}}</text-line>
</bold>
<line-feed />
<small>
<text-line size="1:0">---------------------</text-line>
<text-line size="1:0">Dine-Inn</text-line>
<text-line size="1:0">---------------------</text-line>
</small>
<line-feed />
<text-line>Date & Time: {{moment date format="DD/MM/YYYY HH:MM"}} </text-line>
</align>
<line-feed />
</document>
`
const data = {
name : 'Tahir' ,
date:new Date()
}
const buffer_data = EscPos.getBufferFromTemplate(xml, data);
@VyankeshH Here is sample code. No I yet not use qrcode.
@mtahir08 I got the result,But I didn't got table with this,Did you have any reference for this. Thank you
I want to print some values in bold. Can anyone knows how I can do this. Thanks