OpenPrinting / OpenPrinting/cups

Enable printer icon set up

Open
#1,342 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.8k
Forks
331
Avg merge
9h 42m
Merged PRs (30d)
6

Description

Recently I discovered that there is a client out there, that actually does make use of printer-icons uri. Specifically I mean the Mopria Print Service for Android.

When running ippeveprinter with an option to set the icon file as below
ippeveprinter -v -i /home/pi/4700x.png "My Cool Printer"
viewing printer details in the Mopria app does display the configured icon:

Image

Describe the solution you'd like
What I would like is to have cups similarly allow user configuration of an icon file, and then share it with the client.

The minimum I can imagine would be exposing an icons folder, and then it would be up to the user to put a single relevant 128x128 <printer_name>.png file there, in line with what is currently advertised for a given shared printer by printer-icons (uri)

For a more expanded functionality, if it makes sense, maybe cups could also generate a default cups printer icon in there, whenever a printer is added, which could be then overwritten by the user. Or maybe instead generate on the fly a link to an existing icon like /usr/share/cups/doc-root/apple-touch-icon.png, if a user icon is not available.

If instead of a single icon a set of 48x48, 128x128, 512x512 icons was needed, then maybe just use -sm and -lg suffixes to icon file name, similarly to what ippeveprinter does:
printer-icons (1setOf uri) = https://raspberrypi2.local:8000/icon-sm.png,https://raspberrypi2.local:8000/icon.png,https://raspberrypi2.local:8000/icon-lg.png

Additional context
I realize of course that this is a niche functionality, both from the perspective of user expectations, and of availability of clients that actually make use of icons. So probably the lowest of low priorities. :) But if this change ever makes into some future release of cups, that would be great!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing CUPS handling related to printer-icons URIs and the ippeveprinter behavior described in the issue. Define whether configurable icons, generated defaults, or multiple sizes are in scope, then verify that the selected behavior is advertised correctly to clients such as Mopria.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.