I'm trying to print .pdf documents from the command line using the lpr command and I'm getting this error:

Unsupported document-format "application/pdf"

Could you please help me what can be the issue? I'm using Ubuntu 18.04 and CUPS 2.27

  • Have you tried pdf2ps? – minmaxavg Nov 5 '18 at 0:43
  • What do you mean? Transform the pdf to ps then print it? – Minee Nov 7 '18 at 20:22
  • Yes, it's done on many occasions, and certainly no formatting would be lost anyway. – minmaxavg Nov 7 '18 at 22:18
  • CUPS v2.27 does not exist. Do you mean v2.2.7? – Kurt Pfeifle Dec 15 '18 at 17:02

This could mean two things:

  1. CUPS does not know how to convert incoming PDF documents to the final format your printer (What printer model is it at all??? Troubleshooting stuff like this and trying to help you out is not easy if you are so tight-lipped...) wants.

    • You should check if you have installed the cups-filters package: dpkg -l cups*.
    • If it is missing, install it: sudo apt-get install cups-filters
  2. CUPS does not have an entry (or a commented out entry) naming application/pdf as one of the formats allowed for print submission, and/or does not have a ruleset to allow for auto-detection of this format -- but yet some print client explicitly told CUPS that it is wanting to send application/pdf.

    • Check if the following entry is in /usr/share/cups/mime.types:

    • Check if above entry also has the second field like in the following line:

      application/pdf                 pdf regex(0,^[\n\r]*%PDF)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.