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 Sat 25 Oct 2014, 14:34
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 Posts_count  
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_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_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_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0618s ][ Queries: 11 (0.0208s) ][ GZIP on ]