Questions tagged [pycups]
17 questions
2
votes
1 answer
Pycups - create and send IPPRequest with IPPAttribute and parse response (enable IPP:Hold-New-Jobs)
In CUPS, I want to hold all new printer jobs, check the cartridge levels of my printer and one by one release jobs for printing. (My printer kills the cartridge-chips when falling below a certain percentage to prevent refilling.)
I have CUPS…

Lars Beugelaar
- 21
- 1
- 2
2
votes
0 answers
converting URI to URL using python
I have a list of printers and I got their URI using pycups. now I need to know their IP addresses and to do that, I need to know their URL. How can I convert those URIs to URLs?
for example, I have this
URI:…
2
votes
1 answer
ZPL setup GX430t
I use Raspberry Pi connected to a Zebra GX430t with CUPS. I use the "Local Raw Printer" driver and I send the ZPL directly to the printer using Python.
I use the termal transfert mode, but I have a problem with the printer (300dpi), because the…

Takah
- 345
- 3
- 20
2
votes
0 answers
Python program to print "hello world" via CUPS?
import cups
conn = cups.Connection()
printers = conn.getPrinters()
printer_name = printers.keys()[0]
conn.printFile(printer_name,'/home/pi/Desktop/tempprint.jpg',"Hello",{})
how to printFile change to print text example "hello world"? not…

Pramudya Wisnu Wardana
- 21
- 1
- 3
1
vote
0 answers
I'm trying to install pycups on mac os using the treminal, but I'm getting "building wheel for pycups (setup.py) ... error"
$pip install pycups
Collecting pycups
Using cached pycups-2.0.1.tar.gz (62 kB)
Building wheels for collected packages: pycups
Building wheel for pycups (setup.py) ... error
ERROR: Command errored out with exit status 1:
command:…

Suhas V
- 21
- 4
1
vote
1 answer
Installing pycups via pip is missing cups.h?
I want to install pycups module via pip, but I'm getting following error:
Collecting pycups
Using cached pycups-2.0.1.tar.gz (62 kB)
Building wheels for collected packages: pycups
Building wheel for pycups (setup.py) ... error
ERROR: Command…

Hannes G
- 33
- 6
1
vote
0 answers
Conda / pycups / py37: Symbol not found: _libiconv on macOS mojave
i am struggling to get pycups to work in a conda environment.
I get Symbol not found: _libiconv.
I'm running on macOS Mojave.
I assume it is a path problem because on the same machine it works fine installed in an environment created using python3:…

erikvw
- 416
- 3
- 11
1
vote
1 answer
Python- How to communicate with printer
I've been searching for a few days on how to improve a program I wrote for work. The program, which uses python 3.6, simply sends pre-formatted .doc files to the printer, but I can't seem to find a way on how to signal the function to stop sending…

Tony D
- 11
- 1
- 1
- 3
0
votes
0 answers
I have converted a pdf file to pwg/raster but how do I print it using pycups PrintFile function?
When using lp I can send -o raw as option to print raw file. But how do i do this using pycups ?
I've been trying to find the answer to this since yesterday through the sparse documentation but haven't found anything.
import cups
import subprocess
…

Zain Khaishagi
- 135
- 1
- 9
0
votes
1 answer
Pycups on python 3.10 and above Linux
I have the following line of code in python:
import cups
When i run it i receive on the console:
ModuleNotFoundError: No module named 'cups'
But when i try to install it with pip install pycups==2.0.1
i receive the error
note: This error originates…
0
votes
0 answers
Python3 module 'cups' has no attribute 'Connection'
I try to convert python2 to python3 and there is code not working on `cups.Connection()``
import cups
conn = cups.Connection()
And its produce stacktree
Traceback (most recent call last):
File "/Users/sagara/Downloads/Printing Script/mnd_75…

Rofie Sagara
- 289
- 5
- 17
0
votes
0 answers
How to change orientation of file being printed with pycups
I have this code that i want to use to print out a file in landscape, its printing, but the options don't seem to apply:
conn.printFile('printerName','fileName','',{"orientation-requested":"4"})
but it is just printing normally not in…

Pieter
- 21
- 1
- 2
0
votes
1 answer
PyCups Failed building wheel for pycups on Raspberry Pi
I'm trying to install pycups on my raspberry pi running Python 2.7.16 and pip version 18.1. I'm trying to install with the following command:
sudo pip install pycups
But it keeps failing and giving this error:
Failed building wheel for…

John Roberts
- 93
- 7
0
votes
1 answer
How to fix cups.IPPError: (4096, 'Unauthorized') ? Using cups with pycups
I'm setting up a python app to monitor a cups server.
I'm using the cups wrapper pycups. The python application is in the same server as cups.
The calls to create print jobs and get the printers information and job status are working fine but when…

Fernando Acosta y Lara
- 51
- 1
- 8
0
votes
0 answers
How to print .xlxs file using php or python in raspberry pi?
I have a printer connected to raspberry pi and I want to print a .xlxs file which is in raspberry pi using python or php .I have tried CUPS and libreoffice.By using CUPS i did able to print txt file but not any other file using python using below…

rahul
- 58
- 8