Skip to content

Integrate script before printing with Cups #1

Description

@ricochebonjour

Hi man,
I really like your Floyd-Steinberg effect ! I'm would like to integrate it before an automatic print on a thermal Epson TM-T20II who works with Cups.

Got this code for print;

def printCups(photo_number, filename_prefix):
    filename = filename_prefix + '_' + str(photo_number) + 'of'+ str(total_pics)+'.jpg'
    conn = cups.Connection()
    printers = conn.getPrinters()
    printer_name = list(printers)[0]
    cups.setUser('pi')
    #Photo printed one time
    conn.enablePrinter(printer_name)
conn.printFile(printer_name, photo_number, filename_prefix,{"copies": "1"})

I guess I have to manage something to print from the 'image_file' mentionned in your code ?
Thank's in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions