LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to print from console with LPR? (https://www.linuxquestions.org/questions/linux-general-1/how-to-print-from-console-with-lpr-853262/)

Xeratul 12-30-2010 09:12 AM

How to print from console with LPR?
 
Quote:

export PRINTER="DESKJET-710C"
cd ; lpr PDF/myfile.pdf
gives no printing at all.


However ,I do it with evince using this printer, well configured, and EVINCE (x11) prints the pages.

Please any help would be welcome

kind regards

Nylex 12-30-2010 09:18 AM

You could just do lpr -PDESKJET-710C PDF/myfile.pdf.

If you want to set the default printer, you can do so in ~/.cups/lpoptions, with a line like

Default printer printer-options,

where printer is to be replaced with the printer name and printer-options is replaced with any options that you want (for example, for duplex printing). This stuff can be taken care of by using the command lpoptions, too (as opposed to you doing it manually, I mean).

Xeratul 12-30-2010 04:03 PM

Quote:

Originally Posted by Nylex (Post 4207807)
You could just do lpr -PDESKJET-710C PDF/myfile.pdf.

If you want to set the default printer, you can do so in ~/.cups/lpoptions, with a line like

Default printer printer-options,

where printer is to be replaced with the printer name and printer-options is replaced with any options that you want (for example, for duplex printing). This stuff can be taken care of by using the command lpoptions, too (as opposed to you doing it manually, I mean).

Hello,

I tried this method , but it did not work. I do not understand why actually, all looks fine, but visibly lpr does not work :(
Code:

lpr -PDESKJET-710C PDF/myfile.pdf

Nylex 12-31-2010 12:36 AM

Is CUPS running? If so, go to http://localhost:631 and check if there are any errors on the printer (there's probably a log file in /var/log/cups, so you can check that instead).


All times are GMT -5. The time now is 12:07 AM.