How to print a PDF without xorg/x11 using console?
Hello,
There is a printer on a distant server, and I have quite some lot of pdf to print. Is there any ways to print a PDF without X11? Usually I print with evince, rather than acroread ; but in this case, no X. thanks Greetings to Debian, the best distro on earth :) :) |
no need for X while u have the shell
Code:
pdf2ps You can do something like pdf2ps somefile.pdf|lpr -P printer_name or just print it to post script files like pdf2ps file.pdf file.ps, etc. |
Hi,
Do you know how the printer is configured on the remote system, what the queue name is and if it's accepting jobs from the internet/external source? If so you could set up CUPS with the config files in /etc/cups, create the printer (ipp or http) and print directly to the queue using: Code:
lp -d <document> <queuename> Code:
lp -h hostname:port -d <documentname> Kind regards, Eric |
.
lp file.pdf |
Quote:
I found this howto but http://www.linuxquestions.org/linux/...ter_using_CUPS but my printer is an USB and has no IP number (network cable). |
Hello,
The easiest way is to have it configured and shared with CUPS in my opinion. You can either do all configuration using the configuration files of CUPS (/etc/cups/) or use the web interface. I know you said you don't have a GUI but if you have lynx installed it works as well. Basically you install your usb connected printer under CUPS, configure CUPS to share the connected printer and connect from the other boxes using lp. If you have CUPS installed on the other boxes the shared printer will be instantly available on those boxes too, with the same queue name. I have my USB printer connected to my laptop, share it and can print from another linux laptop to that printer without any problems. Kind regards, Eric |
wow it worked, for the moment
Code:
apt-get install printconf cups lynx get the PPD file here http://www.linuxprinting.org/ then go into : as user lynx localhost:631 Quote:
[X] Share published printers connected to this I have made change in cupsd.conf as i Code:
[X] Share published printers connected to this # Show troubleshooting information in error_log. Code:
Administration |
Hi,
Looking good!!! Also if you make CUPS listen on a network IP, you can administer the whole thing from another computer that has GUI, if you feel more at ease with that. Kind regards, Eric |
I could print using kdeprinter configurator. Lets try to make it purely command line, client side.
print server works now, or almost using cups.(I tested used another client with gui) The client side without X11: I get an error :( Code:
lp -h 10.1.1.10:631 -d test.txt Code:
PORT STATE SERVICE |
Hello,
Where are you stating the queue name? (lp -h <host : port> -d <document> <queuename>) Type Code:
lpstat -a Kind regards, Eric |
Quote:
Code:
$ lpstat -a So the next step to print or to add this printer without X to the user printing configuration, shoudl be possible? |
Quote:
I tried with : lp -PLexmark-Lexmark-Z55 text.txt but nothing come out I played with lprm to delete the evn. bugigng pages. but nothing ... howto: https://kb.iu.edu/data/adzr.html |
Hi,
I don't know exactly how you configure a printer, commandline only for a user to set it as default. I'd have to look it up. If the queue is available to them then they can print, but how to set that up as default per user basis is unclear to me. Kind regards, Eric |
Hi,
Just got this from the CUPS user manual. Quote:
Kind regards, Eric |
Quote:
normally you have to add the export PRINTER=LEXMARK PRINTER can be set in .bashrc lpstat -v gives all the possible printers. but well, I know that, can print with evince/acroread, but it cannot from command line for no idea which reason. |
All times are GMT -5. The time now is 07:10 PM. |