Comments (4)
Hi @tuxmaster5000 !
Add the width=2
parameter to the barcode()
method to reduce the module width of the rendered barcode to the minimum size:
p.barcode("12345678", "EAN8", width=2)
Note that, due to your printer having a low resolution, some long barcode types will not fit into the paper raising the former exception.
from python-escpos.
Which the width=2 option, the printer starts printing, but only garbage output.
from python-escpos.
Yeah, this is the same as in #598 . The printer does not support native hardware bar-code printing so the library automatically switches to software bar-code to render an image of the bar-code and relies on the image()
method to print the image (bar-code). Again, the default values of the image()
method are incompatible with the TM-U2xx series, so the printer ends up printing garbage.
We could workaround the barcode()
method too to allow passing custom parameters to the image()
method through its force_software
parameter, taking care if possible of not break the current behavior of force_software
which selects the best render mode based in the printer capabilities profile data.
However, if it is not too urgent for @tuxmaster5000 to have bar-code working I think it would be easier to add a field in the capabilities database and fix all this issues at a time.
from python-escpos.
Hi @belono it will not be so urgent, because after fixed the qr part, this was an try if this also works.
I need more the qr code function, so waiting will not be an problem.
from python-escpos.
Related Issues (20)
- Image printing prints only garbage HOT 29
- Introduce IntEnum or similar for printer states
- Usb printer not working on web Application HOT 2
- Printer not found on web application HOT 1
- Font switching not working. HOT 3
- is_online() fails with raise NotImplementedError()
- Full cut not working on Epson TM-T20III HOT 2
- 'usb timeout error' when used on a raspberry pi 3 with a cheap POS-58 thermal printer HOT 5
- ImportError: cannot import name 'DeviceNotFoundError' from 'escpos.exceptions' HOT 2
- usb.core.USBError: [Errno 5] Input/Output Error` HOT 1
- EPSON TM-m30III randomly fails to print images HOT 1
- Arabic Text not printing correctly HOT 2
- Tabbed text HOT 8
- windows Invalid endpoint address HOT 1
- Printer Emulator Connection Issue HOT 6
- How to print big5 charcode HOT 1
- CLI not working for CupsPrinter, LP and Win32Raw connectors
- Print to a bluetooth device via rfcomm and printer.File() HOT 3
- macos: Invalid endpoint address HOT 1
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 python-escpos.