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.

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 and printed.

At the moment only single page files are supported.

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.0.1.tar.gz (8.4 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.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cupless-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3adef470adebd90e3f8fb7395019c6e381f5303a24d8701b30b7374beae0c03d
MD5 724da435cd27ca06afee87775a9c68e2
BLAKE2b-256 29e15295caf402396faaff3addef6e1720ce616f4687aee1ec115f6da06604bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cupless-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c7c0da798a919394bbf07be95fa8840b91268033f79a84facc5f32c0b9c36a3
MD5 b200b20932203f31c9b004fbf8da88dc
BLAKE2b-256 1ce51c4857dceb18a3bf26be575dd115be5e58446427868eeba6c931b2c19366

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