I'd like some way of knowing how my document is going to look when it gets printed with lpr without actually wasting paper and ink.

My specific problem is that I'm working with tabular text that should not be wrapped, but also shouldn't be wider than the page.

I have no way to know how many characters will fit horizontally on a portrait print via lpr, and when I read the man-pages on my machine (macbook - darwin), it doesn't appear to have any relevant information.

Ideally, I'd like to see a sample output (whether stdin, or printing to an image and opening via gui, whatever) that will show me how my document will look.

Thank you in advance.

  • Print to PDF first? – jasonwryan May 11 '16 at 3:39
  • That would be fine, but how would I redirect lpr's output to a pdf? – James M. Lay May 11 '16 at 3:39
  • With lpr (as per your question)... – jasonwryan May 11 '16 at 3:42
  • Can you expatiate, maybe with an example? I'm looking through my man pages and I noticed it doesn't say anything about PDF. – James M. Lay May 11 '16 at 3:43
  • Ugh: don't edit your comments to completely change the meaning: it renders this exchange completely unintelligble. Just google "linux+lpr+pdf"... – jasonwryan May 11 '16 at 3:45

Installing CUPS-PDF will allow you to create a virtual printer which prints to PDF files. You can then use that printer with lpr -P to preview your output.

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.