Giter Site home page Giter Site logo

escposprinter's People

Contributors

bluec0re avatar canterburycomputers avatar rtu-dataframe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

escposprinter's Issues

"Cable isn't plugged in" despite functioning in order programs.

Hello there,

So I'm attempting this printer via USB and I seem to facing an issue where it insists the cable isn't plugged, spouting that a NoneType object has no attribute "is_kernel_driver_active", etc,

Now the device is 100% plugged in and will work as a standard printer, however I just can't seem to get it to play along with this module.

I'm using the following line to attempt to connect:
Epson = printer.Usb(0x04b8,0x0e20)

04b8 being the VendorId and 0e20 being the ProductId, which would be the correct information according on USBDeview.

First time using such a piece of kit so quite possible I've missed something obvious, though if you could point me in the right direction that'd be appreciated.

Thanks

Possible to modify time between prints?

I currently have a sort of makeshift queue system which pushes the most recent request to my printer of choice (Munbyn ITPP047), however I find that after each cut(), the printer takes around 4 seconds or so before proceeding with the next one, whereas ideally we'd be looking at around the 1 second mark, or even immediate after if possible,

I'm unable to find any limitations with the printer software itself so wasn't sure if this is within the module, or even pyusb itself, and perhaps there may be a solution or perhaps a workaround to get this delay taken care of.

Intermec Printer

Hi does this work with intermec?

I am trying this

from escpos.printer import Network

try:
kitchen = Network("192.168.1.16") #Printer IP Address
kitchen.text("Hello World\n")
kitchen.barcode('4006381333931', 'EAN13', 64, 2, '', '')
kitchen.cut()
print('print sent')
except Exception as e:
print(e)

Get print sent returned, no errors but nothing to printer. IP address is correct. any ideas?

Printing images is excruciatingly slow

I'm trying to use escposprinter in a RaspberryPi 3 with the very latest Raspbian (released just a few days ago) and an Epson TM-T20 II printer.

Printing text works just fine and is quite fast but printing an image is excruciatingly slow.

This is for a ticketing system, so what I'm doing is using PIL to load a white image (previously created with the right dimensions for the purpose: 400x210), drawing the text over the image and saving it to a temporary file. Then I call Escpos.image() and pass it the path to the temporary image. I'm attaching an example here.
number_temp

It works and the image gets printed but very, very slowly.

When the printer finishes, it seems like the image was divided in rows and each row was printed individually. You can even hear the printer printing each individual row and see the thin blank lines between each filled/drawn row.

Any clue as to why this may be happening and how to fix it?

Here's the code I'm using:

def printQueue(queue_number, queue_line):
    # Base white image where text is to be printed
    img = Image.open(original_img)
    draw = ImageDraw.Draw(img)
    font = ImageFont.truetype("/usr/share/fonts/truetype/roboto/RobotoCondensed-Bold.ttf", 110)
    queue_text = queue_line + ' ' + queue_number
    draw.text((190, 0), queue_text, (0, 0, 0), font=font)
    img.save(temp_img)

    with EscposIO(printer.Usb(0x04b8, 0x0e15)) as p:
        p.printer.image(temp_img)

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.