[comp.sys.mac] Postscript from Word 4.0...?

sullivan@msor.exeter.ac.uk (Rob Sullivan) (02/07/90)

Can anyone tell me if it is possible to intercept the postscript file
produced by software such as Microsoft Word on the Mac before it
reaches the printer?

                         Thanks in advance..

                                              Rob...
--
- - - -
Robert Sullivan           JANET    : sullivan@uk.ac.exeter.msor
Theoretical Physics Dept. UUCP     : sullivan%msor.exeter.ac.uk@ukc.uucp
University of Exeter      BITNET   : sullivan%msor.exeter.ac.uk@UKACRL
England.                  Internet : sullivan%msor.exeter.ac.uk@cunyvm.cuny.edu
EX4 4QL                   Tel      : +44 392 264198

rjt@cbnewsl.ATT.COM (ross.j.thompson) (02/09/90)

Yes Bob,

The simplest way to "intercept" the postscript output from "any" Mac
program is to print the file to disk by holding down, simultaneously,
the cmd-f key combination immediately after clicking the OK box in the
print dialog.  The first file generated this way will be in the same
folder as the Mac Application which the file came from and will be
named Postscript0.  Subsequent files generated from the same or other
applications in the same folder will be named Postscript1, Postscript2,
etc.  These files are text only and may by "pryed" open with your word
processor application.

					Ross Thompson
					AT&T Bell Lab's

					k			

clarson@ux.acs.umn.edu (Chaz Larson) (02/09/90)

In article <SULLIVAN.90Feb7011318@msor0.msor.exeter.ac.uk> sullivan@msor.exeter.ac.uk (Rob Sullivan) writes:
>Can anyone tell me if it is possible to intercept the postscript file
>produced by software such as Microsoft Word on the Mac before it
>reaches the printer?
>

I've written up the below to explain this question when I see it.  If there 
are any errors, let me know.  Otherwise I'll just post it periodically or
when the question is asked.

------
This _has_ to be _the_ most frequently asked question in this newsgroup...

This is actually quite simple to do.  First, be sure that the LaserWriter is
the currently selected printer.  Then select "Print..." as usual.  While in
the "Print" dialog, press and hold the "OK" button.  While holding the "OK"
button "down" [as if you were pulling down a menu], press and hold the
command key and either the "F" or the "K" key with the other hand.  Let up
on the "OK" button and continue to hold Command-F or Command-K until you see
"Creating Postscript(r) File." in place of the usual "Looking for LaserWriter.."
message.  You can now let up on the Command-F/K keys.  A text file will be
created on your disk, probably in the same folder as the program you are
printing from, though they sometimes appear on the root level or in the
Blessed Folder.  The files are named in the same way as screen dumps, that is,
PostScript0, PostScript1, ..., PostScript9.

The difference between holding down Command-F and Command-K is that the former
pipes just the document's PostScript into the file, while the latter includes
the Apple LaserPrep dictionary.

I have found this technique most useful for tracking down print errors in the
public Mac lab I work in.  From time to time, as i'm sure most of us have 
experienced, the LaserWriter driver will choke on a document and the print job
will fail, without the user getting any feedback as to why the job died.  The
dedicated PostScript spoolers, like Adobe's SendPS, generally provide more
informative error messages, so if a job fails, I will dump it to a PostScript
file, then use SendPS to send it to the LaserWriter, and can usually then tell
the user more specifically what they need to change to get the document
printed.

If you find yourself doing this on a regular basis, there is a way to make it
a bit easier by hacking the LaserWriter driver with ResEdit.  Normal caveats
as regard the use of ResEdit apply; my favorite line is, "Use ResEdit only
on a disk with which you wouldn't mind wiping off the bottom of your shoes."
ResEdit is not a dangerous as it was at one time [by that I mean the program is
more stable, and unexpected bombs and corruptions happen less frequently], but
it is still not a tool to be taken lightly.  However, if you follow the 
instructions below to the letter, even the most inexperienced ResEdit user
should be OK.  Alright, on with the show:

1.  Launch ResEdit.
2.  Open the "LaserWriter" file.
3.  Open the "DITL" resource.
4.  Open DITL # -8191.
5.  Select "Select Item Number..." from the DITL menu.
6.  Use this dialog to select item #22.
7.  Select "Open as Dialog Item" from the File menu.
8.  In the window which will appear, you will see four fields labelled
    "Top," "Left," "Bottom," and "Right."  They will all contain 0.
    Change these to contain, respectively, 74, 328, 90, and 428.
9.  Close this window.  You will notice that there is a new checkbox to the
    right of "Manual Feed" which reads "Disk File."
10. Close and save the file, and quit ResEdit.

Now, when you select "Print...," you will be able to merely check this box
before clicking "OK," and the PostScript File will be generated without your
having to press Command-F.  The checkbox takes the place of Command-F, in that
it does not include Laser Prep. 

There is one other ResEdit mod you may wish to make.  STR #-8191 contains the
name that will be given to the created files.  Normally that string is just
"PostScript," so the file ends up in the various locations mentionedd above.
If you change this to a specific pathname, you can make all those files
turn up in the same place.  For example, assume a hard disk named "HD40," on
which is a folder named "Postscript tools," within which is a folder named
"Dumped PS files."  If you wanted these PostScript files you're creating to
all end up in that last folder, you would change the contents of STR -8191 to:

HD40:Postscript tools:Dumped PS files:Postscript

and your Command-F/K files will all be directed into that folder.

That should cover it.

<chaz>

(C) 1990 Chaz Larson

All product names are trademarks of their respective holders.

-- 
----------------------------------------------------------------------
                 Chaz Larson - clarson@ux.acs.umn.edu
            "Hey, I'm no Jack Kennedy..." - Flaming Carrot
----------------------------------------------------------------------

maul@asic.nsc.com (Rob Maul maul@asic.nsc.com (408) 721-7637) (02/21/90)

In article <1096@ux.acs.umn.edu>, clarson@ux.acs.umn.edu (Chaz Larson) writes:
> In article <SULLIVAN.90Feb7011318@msor0.msor.exeter.ac.uk> sullivan@msor.exeter.ac.uk (Rob Sullivan) writes:
> >Can anyone tell me if it is possible to intercept the postscript file
> >produced by software such as Microsoft Word on the Mac before it
> >reaches the printer?
> 
> the "Print" dialog, press and hold the "OK" button.  While holding the "OK"
> button "down" ..., press and hold the command key and either the "F" or the
> "K" key with the other hand.  Let up on the "OK" button and continue to hold
> Command-F or Command-K until you see...

Since I don't have a LaserWriter I can't extract the PostScript using the
Click-OK command-f stuff.  Is this right?  Does one need to purchase a
LaserWriter just to extract the postscript files?  My NeXT laser printer is
400 DPI, so I would not want to use a LaserWriter anyway.

I want to extract the PostScript and move it to my NeXT machine and print
it from there.  I already bought the MacLink software from DataViz to move
the file but, it would be even better if a daemon would run on the NeXT
waiting for spooled PostScript files.  Maybe a daemon that imitated the
LaserWriter protocol would do the trick.  This way additional software
for the Mac would not be needed.

Any Ideas?  Rob Maul maul@asic.nsc.com

mcguire@math.uiowa.edu (Charlie McGuire) (02/22/90)

> 
> Since I don't have a LaserWriter I can't extract the PostScript using the
> Click-OK command-f stuff.  Is this right?  Does one need to purchase a
> LaserWriter just to extract the postscript files?  My NeXT laser printer is
> 400 DPI, so I would not want to use a LaserWriter anyway.
>
You do not need a LaserWriter attached to your Mac to generate the postscript
files. All you need are the LaserWriter and LaserPrep files in your system
folder. The LaserWriter driver won't look for a printer if you re-direct the
postscript to a file.

Charlie McGuire
Systems Programmer
Computer Science Dept.
The University of Iowa
mcguire@cs.uiowa.edu
mcguire@math.uiowa.edu 

tbutler@wpi.wpi.edu (Tim Butler) (02/22/90)

In article <122@cavanasic.nsc.com> maul@asic.nsc.com (Rob Maul maul@asic.nsc.com (408) 721-7637) writes:

   Path: wpi!m2c!husc6!paperboy!snorkelwacker!apple!voder!parns!asic!maul
   From: maul@asic.nsc.com (Rob Maul maul@asic.nsc.com (408) 721-7637)
   Newsgroups: comp.sys.mac
   Subject: Re: Postscript from Word 4.0...?
   Summary: Does Click-OK command-f work even if there is no laserwriter?
	    I think not.  Message is always "laserwriter not found".
   Message-ID: <122@cavanasic.nsc.com>
   Date: 20 Feb 90 21:47:59 GMT
   References: <SULLIVAN.90Feb7011318@msor0.msor.exeter.ac.uk> <1096@ux.acs.umn.edu>
   Organization: National Semiconductor, Santa Clara, CA
   Lines: 25

   In article <1096@ux.acs.umn.edu>, clarson@ux.acs.umn.edu (Chaz Larson) writes:
   > In article <SULLIVAN.90Feb7011318@msor0.msor.exeter.ac.uk> sullivan@msor.exeter.ac.uk (Rob Sullivan) writes:
>> >Can anyone tell me if it is possible to intercept the postscript file
>> >produced by software such as Microsoft Word on the Mac before it
>> >reaches the printer?
>> 
>> the "Print" dialog, press and hold the "OK" button.  While holding the "OK"
>> button "down" ..., press and hold the command key and either the "F" or the
>> "K" key with the other hand.  Let up on the "OK" button and continue to hold
>> Command-F or Command-K until you see...
>
>   Since I don't have a LaserWriter I can't extract the PostScript using the
>   Click-OK command-f stuff.  Is this right?  Does one need to purchase a
>   LaserWriter just to extract the postscript files?  My NeXT laser
printer is

[stuff deleted]

>   Any Ideas?  Rob Maul maul@asic.nsc.com
                                                                               
You do not need a laser printer to do this. Just select the laserwriter
 icon from the chooser. You will then be told to make sure appletalk is
active, and to pick a laserwriter. Appletalk doesn't have to be connected
but does have to be turned on. And there will not be any laserwriter
icons in the top left window of the chooser, but that is ok too.

You will know that you have the proper printer selected if the print
dialog box (that you get when you print something) is for the laserwriter.
It is different from the imagewriter dialog.

				-tim

Tim Butler		(tbutler@wpi.wpi.edu)
Teaching Assistant	HL 103b  ext.5424
Department of Mechanical Engineering
Worcester Polytechnic Institute

prg@bonnie.ATT.COM (Paul R. Gloudemans) (02/22/90)

In article <122@cavanasic.nsc.com>, maul@asic.nsc.com (Rob Maul maul@asic.nsc.com (408) 721-7637) writes:
> 
> Since I don't have a LaserWriter I can't extract the PostScript using the
> Click-OK command-f stuff.  Is this right?  Does one need to purchase a
> ... 
> I want to extract the PostScript and move it to my NeXT machine and print
> it from there.  I already bought the MacLink software from DataViz to move
> ...

If you're running one of the faster Macs you really need to get to the
command-F fast after clicking OK.  Also, make sure you have background printing 
turned OFF in the Chooser Dialog and that Laserwriter is your selected
printer.  Additionally, make sure you don't have some other spooler
like TOPS Spool or SuperLaserSpool running as these will also
intercept you're file just as Apple's Backgrounder will (the reason
for turning OFF background printing in the Chooser).

You DO NOT need a LaserWriter attached to get the PostScript file.  I
do it all the time at home where I don't have a LaserWriter.

To make things really easy for yourself, get hold of the Application
called MyPageSetup (freeware I believe) that will make the Disk File
checkbox in the LaserWriter Print Dialog visible and useable
(along with setting other default print options).
This checkbox functions identically to command-F (not command-K) so
you don't get the LaserPrep (AppleDict) preamble with the PostScript file.  You
can also make the checkbox visible following instructions posted
several times to this group and using ResEdit; the box is already in
the Print Dialog but is not visible and therefore not useable.
With using the checkbox you won't have to worry about getting to the
command-F fast enough after clicking OK.

Oh yes, this will work with any application, not just Word 4.0.

P.S.: How do you intend to coerce the NeXT box into printing your
PostScript file?  (rhetorical, no reply expected!) I know some special
AppleDict bashing has to be done to print on most "foreign" PostScript printers.

clarson@ux.acs.umn.edu (Chaz Larson) (02/22/90)

In article <122@cavanasic.nsc.com> maul@asic.nsc.com (Rob Maul maul@asic.nsc.com (408) 721-7637) writes:
>Since I don't have a LaserWriter I can't extract the PostScript using the
>Click-OK command-f stuff.  Is this right?  Does one need to purchase a
>LaserWriter just to extract the postscript files?  My NeXT laser printer is
>400 DPI, so I would not want to use a LaserWriter anyway.

You don't need a LaserWriter physically attached to the Mac to do this.  Just
add the LaserWriter and Laser Prep files to your system folder, select the
LaserWriter in the Chooser [even though there isn't one available] and try the
Command-F trick again.  It will work.

<chaz>



-- 
----------------------------------------------------------------------
                 Chaz Larson - clarson@ux.acs.umn.edu
"Great Scott! This 9 foot alien woman is a swinger! 
 ...and she has the hots for me!!!"                - Flaming Carrot

clarson@ux.acs.umn.edu (Chaz Larson) (02/24/90)

In some article I wrote:
>In article <122@cavanasic.nsc.com> maul@asic.nsc.com (Rob Maul maul@asic.nsc.com (408) 721-7637) writes:
>>Since I don't have a LaserWriter I can't extract the PostScript using the
>>Click-OK command-f stuff.  Is this right?  
>
>You don't need a LaserWriter physically attached to the Mac to do this.  Just
>add the LaserWriter and Laser Prep files to your system folder, select the
>LaserWriter in the Chooser [even though there isn't one available] and try the
>Command-F trick again.  It will work.
>
><chaz>

I received a bit of E-mail from someone who alleges to be:
adimail!giza!tel@uunet.UU.net
[my mailer didn't like that, hence the post]
who asks:
>Have you actually got this to work with WORD? No one I have contacted can do
>this.
>
>Z

The answer is:
Yes, I do this from MS Word on a regular basis.  I did it about 5 minutes ago,
just to be sure.  Command-F and Command-K output was generated without a hitch.

I'm not sure what could be preventing your system from leaping through this
particular hoop, Z.  Are you sure you have the Laser Prep and LaserWriter files
in your system folder?  Is the LaserWriter chosen?  What specifically happens
when the attempt fails?

Hope I can help clear it up for you...  8)

<chaz>




-- 
----------------------------------------------------------------------
                 Chaz Larson - clarson@ux.acs.umn.edu
"Great Scott! This 9 foot alien woman is a swinger! 
 ...and she has the hots for me!!!"                - Flaming Carrot