4

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

6
  • Have you tried pdf2ps?
    – minmaxavg
    Nov 5, 2018 at 0:43
  • What do you mean? Transform the pdf to ps then print it?
    – Minee
    Nov 7, 2018 at 20:22
  • Yes, it's done on many occasions, and certainly no formatting would be lost anyway.
    – minmaxavg
    Nov 7, 2018 at 22:18
  • CUPS v2.27 does not exist. Do you mean v2.2.7? Dec 15, 2018 at 17:02
  • This issue occurred on my system when upgrading from cups v2.4.6 to v2.4.7. Downgrading back to v2.4.6 allows me to print pdf files using lpr as before.
    – AstroFloyd
    Feb 21 at 10:42

2 Answers 2

2

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:

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

      application/pdf                 pdf regex(0,^[\n\r]*%PDF)
      
2
  • what does it mean if i have CUPS installed but there is no `/usr/share/cups/mime.types'?
    – Ramy
    Sep 18, 2022 at 14:58
  • In my case it is in /usr/share/cups/mime/mime.types.
    – AstroFloyd
    Feb 21 at 10:41
-1

In settings, search for printers and select appropriate drivers under printer details, then select from database.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .