cups ppi parameter should be a string

Bug #1917074 reported by Kenneth Fazzone
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
cups (Ubuntu)
cups-filters (Ubuntu)

Bug Description

cups encode.c treats parameter ppi as an integer, but it should be a string.

the image filter drivers expect the form ppi=300x600
to specify source image dpi for images where it is asymmetric.

I encountered this issue trying to print full-sized images without scaling on a dymo 450 label printer.
This bug causes images to print across 2 labels when trying to use the 300x600dpi graphics mode.

This should print a single label:
lpr -o ppi=300x600 -o scaling=0 -o PageSize=w167h288 -o PageRegion=w167h288 -o Resolution=300x600dpi -o DymoHalftoning=Default -o DymoPrintDensity=Medium -o DymoPrintQuality=Graphics -o MediaDimensions=w167h288 ~/Desktop/test_Graphics_portrait.png

where the png is a 664*2224 image without any dpi metadata.
Instead the ppi option gets sanitized to 300, and the image gets printed across 2 labels.

Description: Ubuntu 20.04.2 LTS
Release: 20.04

  Installed: 2.3.1-9ubuntu1.1
  Candidate: 2.3.1-9ubuntu1.1
  Version table:
 *** 2.3.1-9ubuntu1.1 500
        500 focal-updates/main amd64 Packages
        500 focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3.1-9ubuntu1 500
        500 focal/main amd64 Packages

tags: added: focal groovy
Revision history for this message
Kenneth Fazzone (kfazz01) wrote :

this patch lets the ppi setting be a string

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please report this upstream on

as this is not only concerning Ubuntu, but any OS which uses CUPS.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "cups_ppi_patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Kenneth Fazzone (kfazz01) wrote :

i've reported this upstream, the github issue is:

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Thank you very much.

Changed in cups:
importance: Undecided → Unknown
status: New → Unknown
Changed in cups:
status: Unknown → New
Revision history for this message
Kenneth Fazzone (kfazz01) wrote :

Status in upstream github is closed wontfix.
The reason is that ppi is defined as an integer, and the cups-filters usage is broken.

Reported the issue to cups-filters at

Changed in cups:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.