How to prevent CUPS omitting the bottom of the CUPS Printer test page
April 28, 2021 5 Comments
This is something that has been bugging me for years but I never bothered to look into it until now. When I set up a printer using CUPS Administration and then print a test page, for some printers the bottom of the test page image is cut off, as shown in the scanned image below. Also, the left side of the test page image is too close to the left side of the sheet of paper. This happens when I use the Gutenprint printer drivers, although I do not know if that is a coincidence. The CUPS printer test page (A4 paper) shown below is from a Canon PIXMA MP510 printer using the Gutenprint v5.3.3 driver for that model.
I had a look at the values of the ImageableArea
for A4 paper in the printer’s PPD file, and the as-installed values were as follows:
user $ sudo grep "ImageableArea A4" /etc/cups/ppd/MP510.ppd
*ImageableArea A4/A4: "0.000 0.000 595.000 842.000"
I then edited the PPD file and changed the x,y coordinates of the bottom left of the imageable area from 0,0 to 10,3 for A4 paper so the file now contains the following:
user $ sudo grep "ImageableArea A4" /etc/cups/ppd/MP510.ppd
*ImageableArea A4/A4: "10.000 3.000 595.000 842.000"
It is necessary to restart CUPS when a change is made to the PPD file:
Gentoo Linux installation using OpenRC
user $ sudo rc-service cupsd restart
Lubuntu 20.10 installation using systemd
user $ sudo systemctl restart cups
Now the ‘Printer test page’ printed by CUPS looks like this:
Much better.
ADDENDUM (2 May 2021): I have discovered that the ImageableArea
is not the only factor…
I also have a Canon PIXMA MP560 printer, and I printed a CUPS ‘Printer test page’ on that using the Gutenprint v5.3.3 driver for the Canon PIXMA MP560. A scan of the printed test page is shown below:
The as-installed values of the ImageableArea
for A4 paper in the printer’s PPD file were as follows:
user $ sudo grep "ImageableArea A4" /etc/cups/ppd/Canon_MP560_Wi-Fi.ppd
*ImageableArea A4/A4: "0.000 0.000 595.000 842.000"
Unlike the original test page for the Canon PIXMA MP510, the vertical lines on the left and right sides of the test image are more or less equidistant from the edges of the paper. However, as with the original test page for the Canon PIXMA MP510, the bottom line of the test page was missing. So I tried editing the y coordinate of the bottom left of the ImageableArea
in the PPD file for the Canon PIXMA MP560. However, whatever value I used for the y coordinate of the bottom left of the test image, the bottom line was never printed.
I then looked at the contents of the file /etc/cups/printers.conf
and found that the configuration for the Canon PIXMA MP510 included a line ‘Option fitplot True
‘ whereas the configuration for the Canon PIXMA MP560 did not:
# Printer configuration file for CUPS v2.3.3 # Written by cupsd # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING NextPrinterId 3 <Printer Canon_MP560_Wi-Fi> PrinterId 2 UUID urn:uuid:428a074e-0e81-3ba3-7789-f8050da82c5a Info Canon MP560 Wi-Fi Location My office upstairs MakeModel Canon PIXMA MP560 - CUPS+Gutenprint v5.3.3 DeviceURI lpd://192.168.1.78/lpt1 State Idle StateTime 1619978009 ConfigTime 1619880075 Type 36892 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job </Printer> <DefaultPrinter MP510> PrinterId 1 UUID urn:uuid:0a2a12b5-ea49-33eb-572a-341c1af02f7e Info Canon MP510 Location aspirexc600 MakeModel Canon MP510 series - CUPS+Gutenprint v5.3.3 DeviceURI usb://Canon/MP510?serial=934631&interface=1 State Idle StateTime 1619662185 ConfigTime 1619628669 Type 36876 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job Option fitplot True </DefaultPrinter>
So I stopped the CUPS service, edited the file to add the line ‘Option fitplot True
‘ for the Canon PIXMA MP560, and restarted the CUPS service:
user $ sudo systemctl stop cups
user $ sudo nano /etc/cups/printers.conf
user $ sudo systemctl start cups
The file now looks like this:
# Printer configuration file for CUPS v2.3.3 # Written by cupsd # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING NextPrinterId 3 <Printer Canon_MP560_Wi-Fi> PrinterId 2 UUID urn:uuid:428a074e-0e81-3ba3-7789-f8050da82c5a Info Canon MP560 Wi-Fi Location My office upstairs MakeModel Canon PIXMA MP560 - CUPS+Gutenprint v5.3.3 DeviceURI lpd://192.168.1.78/lpt1 State Idle StateTime 1619978009 ConfigTime 1619880075 Type 36892 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job Option fitplot True </Printer> <DefaultPrinter MP510> PrinterId 1 UUID urn:uuid:0a2a12b5-ea49-33eb-572a-341c1af02f7e Info Canon MP510 Location aspirexc600 MakeModel Canon MP510 series - CUPS+Gutenprint v5.3.3 DeviceURI usb://Canon/MP510?serial=934631&interface=1 State Idle StateTime 1619662185 ConfigTime 1619628669 Type 36876 Accepting Yes Shared Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy retry-job Option fitplot True </DefaultPrinter>
I have the ImageableArea
for A4 paper configured as follows in the Canon PIXMA MP560 PPD file for the Gutenprint v5.3.3 driver (I had to increase the y coordinate of the bottom left of the area to 2.000 in order for the bottom line to be printed):
user $ sudo grep "ImageableArea A4" /etc/cups/ppd/Canon_MP560_Wi-Fi.ppd
*ImageableArea A4/A4: "0.000 2.000 595.000 842.000"
After restarting the CUPS service I printed another CUPS Printer test page and the result is shown below. As you can see, the bottom line is now printed.
So, if the outline of the CUPS Printer test page is not centred or is missing one or more of the lines, first adjust the ImageableArea
for the paper size on which the test page is being printed, and, if that does not result in success, check if ‘Option fitplot
‘ exists for the printer in the file /etc/cups/printers.conf
and that it is set to ‘True
‘.