You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(the printer I'm using is very old and of low quality - hence some lines segments are lost)
Because the printers are generally having low resolution, serif typeface may not be a good choice. I prefer sans serif typeface. Roboto is a good choice. (Noto as well). Any font that claims to work well in low-res could be a good choice.
Some advantages I found:
Alignment: This is a solved problem in html. With now we having the container-queries, we can design a div the way we want.
Tables: html tables adjust themselves
Responsive: Thermal printer comes in many width - 2 inch (my case), 3 inch. With the right css you can target any number of widths.
Tiny and simplified code (mainly image manipulation is only required)
Framework agnostic.
Cons:
Need to fiddle around the printer dpi (mine is 200) and possible print widths.
This issue was to inform you an alternative method. Feel free to close this issue whenever you wish.
The text was updated successfully, but these errors were encountered:
First, thank for your incredible work ⭐
I could keep this myself without bothering you. But seeing #64 and many others, I thought I could just open this issue.
I made a fork: https://github.com/vajahath/image-thermal-printer
What it basically does is convert the "thing to print" into an image (or
HTMLCanvasElemet
) and use the https://github.com/seokju-na/react-thermal-printer/blob/main/packages/printer/src/commands/image.ts image command on it.So far, it is working nice-ish (some tweaks needed here and there)
I converted my div into canvas (https://www.npmjs.com/package/html-to-image#toCanvas). Then printed it using the above command. This gave me unlimited customization.
(the printer I'm using is very old and of low quality - hence some lines segments are lost)
Because the printers are generally having low resolution, serif typeface may not be a good choice. I prefer sans serif typeface. Roboto is a good choice. (Noto as well). Any font that claims to work well in low-res could be a good choice.
Some advantages I found:
Cons:
200
) and possible print widths.This issue was to inform you an alternative method. Feel free to close this issue whenever you wish.
The text was updated successfully, but these errors were encountered: