Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!brolga!brolga.cc.uq.oz.au!vthrc From: vthrc@brolga.cc.uq.oz.au (Danny Thomas) Newsgroups: comp.sys.mac.programmer Subject: downloading a PostScript header, interacting with a PS printer Message-ID: <1991Feb12.101257.23988@brolga.cc.uq.oz.au> Date: 12 Feb 91 10:12:57 GMT Sender: news@brolga.cc.uq.oz.au Organization: VTHRC, University of Queensland Lines: 47 Nntp-Posting-Host: 130.102.176.150 I would like to know the best way(s) to communicate between an application and a PostScript printer. This means both for simply downloading PostScript to print a document, and to interact with the PS interpreter, eg control startup page, query font set, resolution etc. I had a non-exhaustive look in the Usenet Mac Prog Guide, TN91 & IM2 but none seemed to cover the dynamics of interaction nor how to download a PS header file. I guess IUm looking for a good, preferably concise document describing how to use PostScript from a mac I've just started playing with Prograph, the OO visual dataflow environment for the mac, but the problem I've run into is in using the Printing Manager. The following may have a few mistakes cause it is based on memory while the local netnews system wasn't accepting postings. My application has to print 4 labels on each page and I thought it would be easier doing this directly in PostScript which I am more familiar with than QuickDraw. Depending upon your programming skill, native PostScript is also likely to run quite a bit faster than that produced by the LW driver. I defined a set of procedures culminating in one which takes a few strings off the stack and renders a label on the page. This part was easy, as was using pic comments to begin/end PostScript. Using the TextIsPostScript comment seems a lot easier than using a text handle - I couldn't figure out how to get Prograph to append a CR anyway. BTW the application is emitting only PostScript, no QD stuff. The PS header proc set canUt be defined within a page (ie first) unless it is going to be prepended to every one because each close page does a grestore to the state at the beginning of the page erasing those definitions, but I donUt seem to be able to include the PS code in the stuff going to the printer unless it is being RoutputS on an open page. How do you output PS to the Printer Manager so it is placed in the RProc SetS component of a PS file? preferably with the Printer Manager placing it between the proper document structuring comments, or do you have to bypass the Printing Manager? As far as querying with the PS interpreter, IUve written a test page which prints the information I am after and I think it would be easy to channel that the output stream of the PS interpreter but I donUt know to have my mac application accept what is coming back from the LW. A few times in the past IUve done some PS debugging by outputing what looks like an error msg from the LW R[%%Error: ]S and that has been picked up and displayed by TOPS Spool. Any advice/suggestions gratefully accepted Danny Thomas Vision, Touch and Hearing Research Centre University of Queensland.