Coder Social home page Coder Social logo

Barcode not printed about python-escpos HOT 4 OPEN

tuxmaster5000 avatar tuxmaster5000 commented on July 18, 2024
Barcode not printed

from python-escpos.

Comments (4)

belono avatar belono commented on July 18, 2024

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.

tuxmaster5000 avatar tuxmaster5000 commented on July 18, 2024

Which the width=2 option, the printer starts printing, but only garbage output.
Pol1

from python-escpos.

belono avatar belono commented on July 18, 2024

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.

tuxmaster5000 avatar tuxmaster5000 commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.