Python Forum

Full Version: cups
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alguem poderia me ajudar a encontrar um lugar onde consigo pegar todos os parametros possíveis para este comando:
conn.printFile (prin, myfile, "Project Report", {})
tenho imagens JPG para imprimir e quero que imprima em tamanho original

Obrigado
Não podemos ajudar sem ver o código no contexto.
printFile não parece ser um erro sqlite3, e você não está dando informações suficientes...
#!/usr/bin/python3
import time, pprint, cups
 
conn = cups.Connection()
printers = conn.getPrinters ()
pprint.pprint(printers)
print()
 
printer = conn.getDefault()
print("Default1:", printer)
 
if printer == None:
    printer = list(printers.keys())[0]
    print("Default2:", printer)
 
myfile = "./test.txt"
pid = conn.printFile(printer, myfile, "test", {})
while conn.getJobs().get(pid, None) is not None:
    time.sleep(1)
#done