**webcontent.print** it self not working
electron version: 9.4.0
node version: 14.15.1
I'm trying to print data on rendered process. Following sample code I'm trying to print data
const { PosPrinter } = require('electron').remote.require("electron-pos-printer")
const printdata = [
{ type: 'text', value: 'TextValue', style: 'text-align:left;font-weight: bold' },
{ type: 'barCode', value: 'HB4587896', width: 1, fontsize: 9, displayValue: true },
{
type: 'table',
// style the table
style: 'border: 1px solid #ddd',
// list of the columns to be rendered in the table header
tableHeader: ['Animal', 'Age'],
// multi dimensional array depicting the rows and columns of the table body
tableBody: [
['Cat', 2],
['Dog', 4],
['Horse', 12],
['Pig', 4]
],
// list of columns to be rendered in the table footer
tableFooter: ['Animal', 'Age'],
// custom style for the table header
tableHeaderStyle: '',
// custom style for the table body
tableBodyStyle: 'border: 0.5px solid #ddd',
// custom style for the table footer
tableFooterStyle: ''
}
]
PosPrinter.print(printdata, {
silent: true,
printerName: 'Everycom-58-Series',
preview: false,
width: '100%', // width of content body
margin: '0 0 0 0', // margin of content body
copies: 1, // The number of copies to print
timeOutPerLine: 2000
})
.then(() => {
// some code ...
})
.catch((error) => {
console.error(error)
})