LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-29-2010, 09:46 AM   #1
jasonws
LQ Newbie
 
Registered: Oct 2010
Location: Vermont, USA
Posts: 15

Rep: Reputation: 0
Printing a PDF from the command prompt doesn't work


I have a PDF that I built using BIRT, and that works fine. At this point I'm trying to print it using lpr or some other command. It seems as though I should just be able to type lpr invoice.pdf and it should print to the default printer. However, lpstat -t shows "Empty print file!" for the printer, and the printer doesn't do anything, let alone print the file. lpr -l invoice.pdf prints the file, but unformatted - just a bunch of characters and whitespace on a seemingly infinite number of pages. Any ideas?

Thanks,
Jason
 
Old 10-29-2010, 11:07 AM   #2
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Try it this way:

Code:
lpr -P printerName document.pdf
An example from mine:

Code:
lpr -P Officejet_5600 document.pdf
That is a real example I tested - just fit to your needs. It will keep the formatting and print exactly what you see from a pdf reader.
 
Old 10-29-2010, 11:10 AM   #3
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Beat me to it, I was going to say the same thing =p
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
view pdf file through command prompt sumer Linux - Newbie 2 03-31-2009 10:40 AM
Printing PDF Documents from command line with PCL commands. nivantha Linux - Newbie 5 02-15-2008 02:56 PM
Printing Error... cannot print from command Prompt Frame360 Linux - Newbie 1 01-22-2007 01:39 PM
Printing to PDF fedix Fedora 1 10-13-2005 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration