Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 01 Sep 2014, 19:40
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Need std input script for Gsview
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 07 Sep 2005, 18:39    Post subject:  Need std input script for Gsview  

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.
Back to top
View user's profile Send private message Visit poster's website 
menno
Guest


PostPosted: Wed 14 Sep 2005, 06:25    Post subject:  

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 ?

Or is the problem already solved ?
Back to top
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 14 Sep 2005, 07:25    Post subject:  

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 ?


That's right. This does not work:

Code:
 cat afile.ps | gsview -


It does work with the original ghostview.

And no, no solution yet.
Back to top
View user's profile Send private message Visit poster's website 
menno
Guest


PostPosted: Wed 14 Sep 2005, 15:30    Post subject: 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 :
Code:
    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" }
       }


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
Back to top
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 14 Sep 2005, 22:11    Post subject:  

great, I'll check it out in Ical.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0496s ][ Queries: 12 (0.0083s) ][ GZIP on ]