LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 01-13-2003, 06:02 AM   #1
moot
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, 06:05 AM   #2
emanuelgreisen
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 filename.ps)
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/tmp.ps, then use ps2pdf to convert into a PDF file. and remove the temporary files. something like this

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

# print the file
lpr /tmp/tmp.ps

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

#remove old temp file
rm -f /tmp/tmp.ps
 
  


Reply


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 08:44 AM
Where is ghostscript Kocil Slackware 2 10-18-2003 10:56 PM
GhostScript 7.05 polarcat Slackware 1 01-14-2003 06:44 PM
need ghostscript help!!! sarah_777 Linux - Newbie 7 05-09-2002 10:40 AM
Ghostscript Bill Moehring Linux - Newbie 0 08-23-2001 07:59 PM


All times are GMT -5. The time now is 07:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration