🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #2073

Re: ASCII-->POSTSCRIPT (need PS program, not unix, not ibm)

#2073
From: Michael Salmon
Date: Thu, 03 Sep 1992 08:29
53 lines
2259 bytes
In article <16566@ucdavis.ucdavis.edu>, ccm038@othello.ucdavis.edu (Jason Yan (can cook)) writes:
|> 
|> 	Does anyone know of or have a postscript program that will
|> allow the printing of regular ascii files on a HP laserjet II with
|> a postscript cartridge?  I asked in an earlier message, but I didn't
|> make it clear on what I needed.  
|> 
|> What I need is a *POSTSCRIPT* program, not an IBM executable, not a
|> unix executable.  I need a poscript program that I can append text to
|> and have it print on a PS printer without goofing up.  If anyone has
|> successfully used the program Adobe has provided on an IBM environment,
|> please let me know how you got the printer to go from PS mode to PCL
|> mode after it finished printing without having the printer timeout
|> after every print job.  Thanks!

This is from "Learning PostScript, a visual approach" by Ross Smith,
ISBN 0-938-151-12-6. I haven't tried it but the code I have tried in
the book was very good. Note though NO character translations are done,
it only works for plain vanilla text.

%!
%	pstype.ps - text printing prologue
%
/printloop {
  {
    currentfile cvlit			%readline from file
    =string readline			%put it into string
    not { exit } if			%exit on ^D
    show				%otherwise display it
    
    currentpoint exch pop		%get Y position
    10.5 sub dup 36 le			%test position
      { pop showpage 72 730 moveto }	%newpage
      { 72 exch moveto }		%or newline
    ifelse
  } loop
  showpage
} bind def

/Courier findfont 10 scalefont setfont
72 730 moveto
printloop

-- 

Michael Salmon

#include	<standard.disclaimer>
#include	<witty.saying>
#include	<fancy.pseudo.graphics>

Ericsson Telecom AB
Stockholm
Technical Details
Message-ID: <1992Sep3.082907.5083@ericsson.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!ericom!eos.ericsson.se!etxmesa
References: <16566@ucdavis.ucdavis.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!ericom!eos.ericsson.se!etxmesa
From: etxmesa@eos.ericsson.se (Michael Salmon)
Subject: Re: ASCII-->POSTSCRIPT (need PS program, not unix, not ibm)
Message-ID: <1992Sep3.082907.5083@ericsson.se>
Sender: news@ericsson.se
Nntp-Posting-Host: eos6c02.ericsson.se
Reply-To: etxmesa@eos.ericsson.se (Michael Salmon)
Organization: Ericsson Telecom AB
References:  <16566@ucdavis.ucdavis.edu>
Date: Thu, 3 Sep 1992 08:29:07 GMT
Lines: 53