Can anybody think how to do this?...
The original Ghostscript, which is a Postscript/PDF viewer, accepts standard input on the commandline, as well as a filename.
Some applications, for example, Ical, invoke Ghostscript like this:
ghostscript -
Unfortunately, the developer of Gsview, the Postscript viewer used in Puppy, neglected to support standard input on the commandline.
Currently Puppy has ghostview as a symbolic link to gsview, but I propose that ghostview become a small script or C application that will accept std input on the commandline, write it to a file, for example /tmp/printing.ps, then run gsview.
Anyone know how to write code that will do that?
...it's probably real simple, but I haven't had my morning cup of coffee yet, so my brain is only partially functioning.
Need std input script for Gsview
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
That's right. This does not work:menno wrote:It means that a program write somthing to stdout which is used as a pipe to stdin . And the call to gostscript does not understand how to read stdin ?
Code: Select all
cat afile.ps | gsview -
And no, no solution yet.
viewing printing
Barry the problem is in dg_print.tcl .
first change at line 46 'ghostview -' -> 'ghostview ' , better is to change it into 'gsview ' .
replace 214 and on into :
What I done is save standard to the file 'cal.ps' and if preview or printing call
exec <command> cal.ps
It seems to work . Greating Menno
first change at line 46 'ghostview -' -> 'ghostview ' , better is to change it into 'gsview ' .
replace 214 and on into :
Code: Select all
pr_file $pr_save $output
switch -exact -- $pr_type {
save { }
print { exec $pr_print $pr_save }
preview { exec $pr_preview $pr_save }
default { error "Unknown printing mode $pr_type" }
}
exec <command> cal.ps
It seems to work . Greating Menno