How to Add Custom Paper to CUPS

In this tutorial we’ll learn how to add custom paper to CUPS printer in Linux/MacOS, for example we’ll try to add A6 paper size. To get the right size we might need to do trial/error because not all the printer had the same size for A6, check the manufacture for guidances. For cups it is using pixel not MM/CM for measurement standard.

CUPS manages the paper configuration using PPD files, which should be available in /etc/cups/ppd/{PRINTER_NAME}. To check the printer name use the UI http://localhost:631/printers/ or command line lpstat -p

$ lpstat -p
printer Ink_Tank_310 is idle.  enabled since Sat 17 Jan 2025 03:05:42 PM

For my printer A6 paper is missing, because I need to print a lot of A6, I can’t live without it. Open the PDD file, then search for PageSize add the line after the first PageSize

*PageSize A6/A6: "<</cupsInteger0 24/PageSize [297.84 419.52]/ImagingBBox null>>setpagedevice"

A6 cups printer settings

After add the custom paper, restart the CUPS

sudo systemctl restart cups

To verify, try to print the A6 from LibreOffice or any editor of your choices.
a6 test print page

Leave a Comment