Open saaiful opened 2 years ago
Of course you can do:
ThermalPrinter.printFormattedText({
// ... your settings ...
printerDpi: 203,
printerWidthMM: 76,
printerNbrCharactersPerLine: 48
}, function() {
console.log('Successfully printed!');
}, function(error) {
console.error('Printing error', error);
});
As you can see here: https://github.com/paystory-de/thermal-printer-cordova-plugin/blob/main/src/android/ThermalPrinterCordovaPlugin.java#L312
If you specify the charsetEncoding
in the JSON object you can also specify a charsetName
and/or charsetId
.
Example:
ThermalPrinter.printFormattedText({
// ... your settings ...
charsetEncoding: {
charsetName: 'windows-1252',
charsetId: 16
}
}, function() {
console.log('Successfully printed!');
}, function(error) {
console.error('Printing error', error);
});
DantSu/ESCPOS-ThermalPrinter-Android
Alignment is not working properly in 3inch paper.
new EscPosPrinter(printerConnection, 203, 76f, 48)
76mm width printing area. 80mm - 2mm of marging on each side. 203dpi 48 chars per lineOriginally posted by @DantSu in https://github.com/DantSu/ESCPOS-ThermalPrinter-Android/issues/157#issuecomment-877034893
This seems to solve the issue, but in this repo i dont see any option for setting this.
Also setting encoding is not avaiable but getiing encoding is available !