Best of the Newsgroups: Linux print pdf files


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: mps <soccio.n0spxm@fast-mail.org>
Subject: Re: commandline PDF printing References: <8a586b51.0301100417.585bc8f2@posting.google.com>
Date: Fri, 10 Jan 2003 13:21:04 GMT


Hate these ads?



VUK wrote:



> Is there a way to print a PDF document to a printer in command
> line? Suppose acrobat reader is installed but KDE (X) is not
> running?

> is there a command like:

> printpdf sample.pdf -Prlmip0 , where rlmip0 is a printer
> defined in /etc/printcap ? post answer here
> Thanks
> VUK














What printing package are you using?  CUPS has built in PDF 
processing support so that lp -d yourprinter sample.pdf or lpr 
-P yourprinter sample.pdf will work.  LPRng has file recognition 
support so that you have to hack the filter config file to point 
it to a program that will convert your pdf to a printer-friendly 
file.




Comments /Bofcusm/1958.html


Sat Jul 12 03:07:57 2008: Subject:   anonymous


> Is there a way to print a PDF document to a printer in command
> line? Suppose acrobat reader is installed but KDE (X) is not
> running?
>
> is there a command like:
>
> printpdf sample.pdf -Prlmip0 , where rlmip0 is a printer
> defined in /etc/printcap ? post answer here
> Thanks
> VUK

yes, you can do this, provided that you have acroreader installed. Create file printpdf in your home directory (e.g. vim printpdf) and copy the following lines there:
#!/bin/csh
if( $# == 2 ) then
set printer=$2
else
set printer=$PRINTER
endif

if( $1 != "" ) then
cat ${1} | acroread -toPostScript | lpr -P $printer
echo ${1} sent to $printer ... OK!
else
echo PDF Print: No filename defined!
endif

Save this file and change mode to executable (chmod a+x printpdf) That's it! You can print pdf now:
printpdf Yourfile.pdf printername




Wed Aug 20 15:17:19 2008: Subject:   anonymous


heh
[root@cbusa drc]# ./printpdf sales_pw_1.2v1_0corrected.pdf linux
acroread: Command not found.
lpr: stdin is empty, so no job has been sent.

I have installed Adobe full package from adobes website am I missing something

Wed Aug 20 17:01:16 2008: Subject:   TonyLawrence


Acroread not installed or not in $PATH

Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
713632,389 9,351

/Bofcusm/1958.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Newsgroup




Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://bcstechnology.net Full service Linux & UNIX systems integrator; Windows to UNIX/Linux Client-Server Specialist; Secure E-Mail & Website Hosting; Thoroughbred Software Developer; Custom Industrial Automation; Hardware & Electronics Experts; In Business Since 1985.


http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


UBB Computer Services Support for Openserver, Unixware and Linux. Windows integration with Unix/Linux servers. Hardware, Backup and Networking issues. Located near Sacramento CA, we provide onsite support throughout Northern CA and Nationwide via remote access. We are a SCO Authorized Partner and a Microlite BackupEdge Certified Reseller.




card_image








Change Congress


Related Posts