Comments (2)
I see, Thanks for the help! :)
from react-thermal-printer.
Hello π
react-thermal-printer
does not provide a method to communicate with devices but focuses on creating print data using React.
If you are using NodeJs, you can send print data over Local IP using the net
module.
import { render, Printer, Text, Cut } from 'react-thermal-printer';
import { connect } from 'node:net';
const data = await render(
<Printer type="epson" width={42}>
<Text>Hello World</Text>
<Cut />
</Printer>
);
const conn = connect({
host: '192.168.0.99',
port: 9100,
timeout: 3_000,
});
conn.write(Buffer.from(data), () => {
conn.destroy();
});
conn.on('error', ...);
conn.on('timeout', ...);
from react-thermal-printer.
Related Issues (20)
- Print via serial port (Web) - How to troubleshoot HOT 2
- Row throws an error when string from right side is too big HOT 1
- Are supported printer types Epson and Star only? HOT 1
- Disable floyd-steinberg option for print image HOT 1
- Printing in arabic is not working.
- TypeScript >= 5 support
- Jest to vitest
- Partial Cut Discussion HOT 1
- Will it Work for Multiple printers HOT 1
- Printer Paper Width. HOT 2
- Error Uncaught TypeError: Cannot read properties of undefined (reading 'prototype') HOT 3
- Does it work with bluetooth thermal printer? HOT 1
- Image align and Row center content are not centered
- 리μ‘νΈλ€μ΄νΈλΈμμλ μ¬μ©μ΄ μλλκ±ΈκΉμ?
- can i render three aligns like this HOT 2
- Some values are missing HOT 1
- Just pointing out an alternative method HOT 2
- Can you export this as a type like PrinterType? HOT 1
- Issue with using react-thermal-printer with local IP printers HOT 2
- eslint, prettier -> biomejs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-thermal-printer.