[comp.sys.mac.programmer] PostScript Printing Problems

tim@hoptoad.uucp (Tim Maroney) (12/01/90)

I sent this to MacDTS via AppleLink a week ago.  So far I have not even
gotten the usual acknowledgment of message receipt.  I thought I would
bounce it off the good people here instead.

Source: Q Stack
Subject: Printing
Seed: no
Priority:   Important
 
Q Stack, Version 1.0
The Problem --
The general category:  Printing
 
Our Product:
(confidential information removed for USENET posting)
 
The Problem:
I need to send large amounts (megabytes) of PostScript image data to a
LaserWriter using the high-level Printing Manager interface, from MacApp
(overriding TStdPrintHandler.DrawPageInterior).  What is the best way to do
this?
 
Efforts to resolve the problem:
I did it at first using the PostScriptFile comment; this worked wonderfully,
but it turned out not to be supported in background mode, and so to be useless.
 
Then I tried successive calls to the PostScriptHandle comment with large (~16K)
handles.  Also worked wonderfully in foreground printing mode, but in bkgnd
mode, it appears you have to put the comments into real PICT handles (rather
than just calling PicComment in the printing GrafPort context).  Not only is it
impossible to have a multi-megabyte PICT handle, but any drawing into a picture
while printing to a LaserWriter appears to cause serious problems.  I tried
using multiple pictures, one for each data buffer, but it seems to crash if
PostScriptHandle is not framed by PostScriptBegin/PostScriptEnd in each
picture, and that would cause "psb" and "pse" commands to break up my
hexadecimal image data.
 
Sources Consulted:
Inside Macintosh II, Ch. 5; IM V, Ch. 22; Tech Notes 72, 73, 91, 122, 123, 183,
192; an old Inside Laserwriter I happened to have; LaserWriter Reference
Manual.
 
The Priority for us --   Important
 
System configuration --
 
CPU:
Machine type: Macintosh IIfx, System version: 6.0.5, Processor: Motorola 68030,
Has FPU?: true, Has CQD?: true, Keyboard: Apple Extended keyboard, Appletalk
version: 54, System Folder WDRefNum: -32541
Total Ram: 8MB
Video:
2 monitor(s)
Slot 4,640 x 480,256 Colors
Slot 1,640 x 480,direct RGB
 
Printer(s):
Laserwriters, QMS ColorScript
Platform:
THINK Pascal 3.0.1, MPW Pascal 3.1, MPW C 3.1, MacApp
Inits:
 INITPicker 2.0, 8%24 GC, ADSP, Apple CD-ROM, AppleShare, Boomerang, CEToolbox,
DA menuz, DiskLight, Flowfazer*, Foreign File Access, IconWrap 1.2, INIT Mr.
Bus Error, Programmer's Key, QM Menu*, QuickINIT, Responder, Shiva Config,
Suitcase* II, SuperClock!, TOPS TCP/IP, W Disinfectant INIT,
 
Who we are --
 
Tim Maroney
Electronics for Imaging, Inc.
Research and Development
950 Elm Avenue
San Bruno, California, USA, 94066
 
Programmer info --
 
Programming field and competence level:
Apple II: None
Macintosh: Expert
General: Expert
 
Contact Info --
AppleLink Address:  D3861
Phone:  (415) 742-3400  Extension:  424
Fax Number:  (415) 742-0251
 
 
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

The fact is self-evident from the text and requires no supporting argument.