What types of files, such as images (jpg, png, tiff) and documents (pdf, doc, docx, xls) can lp render correctly and print? I'm trying to make a print kiosk and don't quite know how accommodating I can be with lp to print from the command line with a script.


lp (/lpr) can only print PDF, p(ost)s(ript), and plain text files.

But this does not has to stop here: you can make PDFs with a lot of tools and then print that PDF.


  • If you want docx and other Microsoft formats you can use a converter like JODConverter to convert those to PDF.

  • For images you can do the same: make a PDF from the image and print that:

    mogrify -format pdf *.jpg

    will create a PDF from jpgs.

  • Or with the convert command in imagemagick:

    for file in *.jpg ; do convert "$file" "${file/%jpg/pdf}" ; done

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.