Skip to main content

A Linux command-line wrapper to print from the command-line without cups

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cupless-1.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cupless-1.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file cupless-1.1.0.tar.gz.

File metadata

  • Download URL: cupless-1.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for cupless-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bb36add4769fe646f9653748c84a393b755dccf8953d82058ddfaa34c43c726f
MD5 bf20a42c6b9cb8da518c45c4338246e6
BLAKE2b-256 a06d74fd564bf02b5c2188c626e7327b8dc2411834ce44714b97bc5fc95f3b42

See more details on using hashes here.

File details

Details for the file cupless-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: cupless-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for cupless-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbbc0df5a6fceb449d6a3237f5f967bfd89e46a36545443f9737004b1e40ef8d
MD5 bbb275dab526fe0a420477fe6f1a3ce1
BLAKE2b-256 353b2182b896cf35e14ab6a2e1aede0acacc8b7503d9f1d23b4ec4b9e2568f15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page