cupless
@readwithai - X - blog - machine-aided reading - 📖⚡️🖋️
Printing on Linux without CUPS.
[This is a first-cut - but I'm throwing it live because... I'm done with printers for today]. I might add more features when i need to rpint more stuff.
Motivation
I don't like CUPS. It's this hidden daemon that hides in the background and gets in the way of printing can go wrong and is then difficult to debug. We live in the future with standard file formats (.pwg) and standardized printer protocols (ipp) - we should be able to print directly on the command-line immediately and just see the errors right there, rather than debugging through a layer of queues with errors and obscure commands.
Installation
This tool depends on mutool, ipptool, and pdfjam. Importantly, all of these can be installed with apt on ubuntu with sudo apt install mupdf-tools texlive cups-ipp-utils (texlive supplies pdfjam)
Once you have installed these you can install this with pipx.
pipx install cupless
Usage
cupless file will print a file with ipptools. Images will be scaled to fit a page.
At the moment only single page files are supported - I image i will fix this as soon as I have to print something with multiple pages.
Some technical details
ipp is an HTTP-based standard that most printers support that allows files to be sent to the printer and printed. Unfortunately, likely to make printers simpler, standard formats such as PDF or PNG are not supported - rather than either niche (PWF, URF) or proprietary or lossy (JPEG) formats.
This tool is a wrapper around mutool and ipp which takes a PDF converts it into a niche format and sends it to a printe.
Alternatives and prior work
Obviously there has been a bunch of work on standardizing printers. This tool makes use of mutool for converting PDF. Attah wrote a tool called ippclient (and an alternative to mutool) which I think performs a similar role to this tool - but there is no automatic installation process for this tool.
Caveats
I didn't want to depend upon ipptools as this is maintained by cups (though it is a separate package). However, I had difficulty getting the print command to work so gave up and used iptools. If I feel inspired (of if you do and feel like submitting patches) I might remove this. pdfjam depends on latex and texlive - which is quite big - however it is quite good at resizing images.
This only works with printers that have a default resolution of 300dpi.
About me
I am @readwithai. I create tools for reading, research and agency sometimes using the markdown editor Obsidian.
I also create a stream of tools that are related to carrying out my work.
I write about lots of things - including tools like this - on X. My blog is more about reading and research and agency.
Metadata
Release files for cupless 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cupless-1.1.0.tar.gz | 8.5 kB | Without provenance | Details for cupless-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cupless-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for cupless-1.1.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / cupless-1.1.0.tar.gz
| Download URL | cupless-1.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb36add4769fe646f9653748c84a393b755dccf8953d82058ddfaa34c43c726f
|
|
BLAKE2b-256 checksum How to use checksums |
a06d74fd564bf02b5c2188c626e7327b8dc2411834ce44714b97bc5fc95f3b42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / cupless-1.1.0-py3-none-any.whl
| Download URL | cupless-1.1.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbbc0df5a6fceb449d6a3237f5f967bfd89e46a36545443f9737004b1e40ef8d
|
|
BLAKE2b-256 checksum How to use checksums |
353b2182b896cf35e14ab6a2e1aede0acacc8b7503d9f1d23b4ec4b9e2568f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for cupless 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.