node-thermal-printer | This npm package was made to control epson and star thermal printers | Runtime Evironment library
kandi X-RAY | node-thermal-printer Summary
kandi X-RAY | node-thermal-printer Summary
Node.js module for EPSON and STAR thermal printers command line printing.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Display an example log
- print test size
- Get an interface
- Test print connection
node-thermal-printer Key Features
node-thermal-printer Examples and Code Snippets
Community Discussions
Trending Discussions on node-thermal-printer
QUESTION
I'm working on a software project which I've created with Electron and React. I didn't create the project from scratch, I am using a boilerplate which uses Webpack.
The software is for managing (selling & redeeming) vouchers, so I also have to print some receipts. Using the printer over network is working fine, just as it should. For printing I'm using the node-thermal-printer
package (https://www.npmjs.com/package/node-thermal-printer).
But some of the printers don't have a network interface, just USB or Serial.
When using the node-thermal-printer
with a USB connected printer, you have to provide a "driver" to be able to print. They suggest either the electron-printer
or printer
module, which both seem to be native NodeJS modules.
The boilerplate seems to compile the native modules for the architecture that is currently used and creates a *.node
file, which is copied to the .wepback/
folder during the build phase. But as soon as I want to use the package, I get an error that the module could not be found.
I'm importing the module with the following line:
const printerDriver = require("printer");
When running npm start
the native dependencies are compiled and a node_printer.node
file is created and copied to .webpack/main/native_modules/lib/node_printer.node
.
As soon as I click the button for printing, I receive the following error:
...ANSWER
Answered 2022-Jan-04 at 15:33Instead of hardcoding the absolute path in the require you can just reconstruct it using a solution like:
QUESTION
I'm trying to print Chinese characters to a thermal receipt printer using NodeJS with the node-thermal-printer module.
...ANSWER
Answered 2021-Jul-28 at 08:44The article you are referring to is information when using another API called OPOS, and the reference article in it seems to be general knowledge in C#.
They would not be applicable when using node-thermal-printer.
In the node-thermal-printer example, it seems that the string is printedln after simply setting characterset.
node-thermal-printer/examples/charsets.js
QUESTION
ANSWER
Answered 2021-Jun-19 at 04:34First, try this solution. Edit your TypeScript Config file (tsconfig.json) and add a new key-value pair as
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-thermal-printer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page