@abrazasoft/thermal_printer_vuejs
v1.0.2
Published
print on thermal printer from vuejs
Downloads
8
Maintainers
Readme
first download the plugin for windows and run it
https://mega.nz/file/ne4izbZa#mzZwvqsk_uOBl8K5Z-uhQYlOE9dPzqiBkv1NXBPGFbY
install module
npm i @abrazasoft/plugin_impresora
import module
import printer_plugin from "@abrazasoft/thermal_printer_vuejs"
how get printer list
getprinters(){
printer_plugin.obtenerImpresoras().then((printers) => {
console.log(printers)
});
}
How send printer
async imprimir(){
var nombreImpresora = "printername";
var api_key = "123456"
if (!nombreImpresora) return;
const conector = new printer_plugin();
conector.fontsize("2")
conector.textaling("center")
conector.text("Store Name")
conector.fontsize("1")
conector.text("Siempre viva #1234")
conector.text("tax854522")
conector.feed("3")
conector.textaling("left")
conector.text("Fecha: Miercoles 8 de Septiembre 2021 13:50")
conector.text("qty. desc amount")
conector.text("-------------------------------------------------------------------")
conector.text("1- KG Sinker nails $110")
conector.feed("1")
conector.fontsize("2")
conector.textaling("center")
conector.text("Total: $275")
conector.barcode_128("holamundo")
conector.feed("5")
conector.cut("0")
const resp = await conector.imprimir(nombreImpresora, api_key);
if (resp === true) {
console.log(resp);
} else {
console.log("Error: "+resp)
}
}
you can perform these actions
-text
-qr
-fontsize ("1"), ("2"), ("3")
-feed ("5"), ("10"), ("15")
-textaling ("center"), ("left"), ("right")
-barcode_ean13 (format 12 digits) example barcode_ean13("978020137962")
-barcode_39 example ----------- barcode_39("ABC-1234")
-barcode_128 ("any string")
-img_url --------------- img_url("https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png")
-cut ("0")
do you need help with something? [email protected]