Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-13-2003, 05:02 AM   #1
LQ Newbie
Registered: Jan 2003
Location: UK
Distribution: RedHat
Posts: 1

Rep: Reputation: 0
Ghostscript printing

Hi - I wanna config my PC so when I press the "print" button the machine sends a print job to the printer [on LPT1 or TCP/IP] and it automatically generates a PDF of the same output.

I think I can use Ghostscript to do this, but do not know how to script this. Anyideas please?

TIA - Moot out .....
Old 01-31-2003, 05:05 AM   #2
LQ Newbie
Registered: Jan 2003
Distribution: Gentoo
Posts: 8

Rep: Reputation: 0
First, in what program is the "print" button ?
second, can you print to your printer right now ? (using lpr
You might have to make a shellscript of some sort and run that from your app instead of lpr directly. The script would then take the input print it and save it to /tmp/, then use ps2pdf to convert into a PDF file. and remove the temporary files. something like this

# super print script
# read from stdin (not sure if this will work)
cat $@ > /tmp/

# print the file
lpr /tmp/

# create the pdf-file
ps2pdf "/tmp/" "/home/myuser/pdfs/print-$DATE.pdf"

#remove old temp file
rm -f /tmp/


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing in FreeBSD using LPD / APSfilter / Ghostscript-gnu shahriar *BSD 0 02-20-2004 07:44 AM
Where is ghostscript Kocil Slackware 2 10-18-2003 09:56 PM
GhostScript 7.05 polarcat Slackware 1 01-14-2003 05:44 PM
need ghostscript help!!! sarah_777 Linux - Newbie 7 05-09-2002 09:40 AM
Ghostscript Bill Moehring Linux - Newbie 0 08-23-2001 06:59 PM > Forums > Linux Forums > Linux - Software

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

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