TweetFollow Us on Twitter

Spring 91 - PRINT HINTS FROM LUKE & ZZ

PRINT HINTS FROM LUKE & ZZ

COLOR PRINTING WITH LASERWRITER 6.0 REVISITED

PETE "LUKE" ALEXANDER and Zz

[IMAGE Luke+Zz.gif]

Luke speaks

With the release of 32-Bit QuickDraw version 1.0, Apple wanted to find a way to support color printing on the high-end (albeit black-and-white) LaserWriter® II, as well as other, third-party devices. So, the great implementors (GIs) created a new LaserWriter driver--version 6.0. This driver added a new Color/Grayscale button to the print dialog, allowing users to print their "way cool" color pictures that were created with 32-Bit QuickDraw. All was happy in the land of Apple's new color model. But wait! There was a problem lurking on the horizon, a problem called the PostScript Offending Command Error.

Imagine this scenario: You've just created a cool 32-Bit QuickDraw picture, a true masterpiece, and all seems to be going well. You decide to print your picture and show it off to Mom. You choose Print from the File menu; the print dialog appears, and you click OK. A few minutes pass, and voilà: a printed page containing your picture. Life is gooood.

With this success, you're now dreaming of other pictures that you'll be able to create and print. You create another cool 32-bit picture. You choose Print from the File menu; the print dialog appears, and you click OK. A few minutes pass, and this time the PostScript Offending Command Error dialog appears, looking something like this:

Error: LimitCheck; Offending Command: 080AGOBBLEDEGOOK0B

What's this? An offending command? But all you wanted to do was print your color picture. You were able to print your first picture a few minutes ago. What's going on? Unfortunately, LaserWriter driver version 6.0 does not reliably print images that are deeper than 8 bits. We won't bore you with the details: just think of the LaserWriter driver as a shark, ready to swallow a surfer off the California coast. But instead of the surfer dude it was expecting, in rushes the surfer dude's surfboard. The LaserWriter driver chokes on deeper images just as our poor shark chokes on the surfboard; the driver is ready to receive a particular variable but occasionally receives something different, and doesn't know what to do with it. The result: the PostScript Offending Command Error. Life is no longer so good; your dreams are beginning to fade away. But I can see a solution appearing on the horizon . . .

Actually, there are three possible solutions: you can use LaserWriter driver version 6.1 (or version 7.0 when it's available); you can depth-convert your image from 32 bits to 8 bits using 32-Bit QuickDraw; or you can use the PostScript ® image operator to generate PostScript code for your image, and send it directly down to the LaserWriter. Let's look at each solution.

Using LaserWriter driver version 6.1 is the simplest solution. LaserWriter driver version 6.1 likes data of any depth, no matter when it's sent. So, if you're printing to LaserWriter driver version 6.1, life is happy when you're printing your 32-bit images--but how can you be sure that you're using LaserWriter driver version 6.1?You can call PrDrvrVers, which is provided by the Printing Manager to enable your application to determine which version of a particular printer driver you're talking to. But there's a minor problem with this call. You don't know if you're talking to a PostScript LaserWriter or some other device. So, you must dive into the bowels of the print record for additional information. You need to check the high byte of the wDev field of the TPrStl record to determine a particular driver and version. But wait! You thought checking wDev was evil. In this case, using wDev is OK because you're not checking for particular functionality of a driver, and thereby not making your code device dependent. If wDev is 3, you know that you're talking to a PostScript LaserWriter. Non-PostScript LaserWriters (for example, the LaserWriter IIsc) have a different value for the wDev field. You would then call PrDrvrVers to determine if you're talking to LaserWriter driver version 6.1. If PrDrvrVers returns 61, you know that you're using LaserWriter driver version 6.1, and life is good again. If wDev is 3, and the driver version is less than 61, you're not using LaserWriter driver version 6.1, so you have a little more work to do: try the next solution.

The next possible solution is to use 32-Bit QuickDraw to depth-convert your 32-bit image to 8 bits by using 32-Bit QuickDraw's GWorld support. You would first create an 8-bit GWorld containing a grayscale CLUT, and use CopyBits to copy your 32-bit image into it. You would then use CopyBits to copy the 8-bit image directly into the printer's grafPort, and voilà--your image would be printing. This approach works with LaserWriter driver version 6.0 and later.

Your final option is to use the PostScript image operator to generate PostScript code that represents your 32-bit image. This approach is a little more complex than the 32-Bit QuickDraw idea. To send your data down to the LaserWriter, you would need to use the PostScriptHandle PicComments with the image operator. If you're already sending PostScript code to the LaserWriter, this is probably the best approach.

By the way, if you don't have a copy of LaserWriter driver version 6.1, it's available on theDeveloper Essentials disc. If you want to ship this version of the driver with your application, you should contact Apple Software Licensing for the details.

In conclusion, we have some good news and some bad news. The good news is that we've fixed the 32-bit image printing problem that was present in LaserWriter driver versions 6.0, 6.0.1, and 6.0.2. LaserWriter driver version 6.1 will allow you to print pictures that are 1 bit to 32 bits deep without any problems. The bad news is that if you want your application to print all depths of pictures with LaserWriter driver version 6.0, you're going to need to do a little extra work, either depth- converting your pictures from 32 bits to 8 bits before print time, or using the PostScript image operator to generate PostScript code for your image. Now that's not so bad, is it?



PETE "LUKE" ALEXANDER spends much of his Developer Technical Support time diving deep into the bowels of the Printing Manager, where he never turns up his nose at a challenge or at odiferous code that needs explaining. Although that kind of diving is fun, he prefers the balmy blue waters of anyplace (preferably far from computers) that has both beach and beer close together. If he can't get away from it all on the beach somewhere, he'll settle for getting above it all in his glider; with Luke, being up in the air about something takes on a whole new meaning. Fortunately, not everything on the horizon is blue sky. Luke's looking forward to the cool new printing architecture that will make his job (and yours) a lot easier. He's preparing for this new architecture by spending a week sailing around the Caribbean--figuring that he'd better start getting used to a life of leisure. Until that leisure can become a lifestyle, you can count on seeing lots from Luke. *

For details regarding the use of the PostScriptHandle PicComments, take a look at Technical Note #91, Optimizing for the LaserWriter--PicComments. *

For details about depth-converting your 32-bit images or using the PostScript image operator, see Technical Note #72, Color Printing. *

 
AAPL
$118.93
Apple Inc.
-0.07
MSFT
$47.81
Microsoft Corpora
+0.06
GOOG
$541.83
Google Inc.
+1.46

MacTech Search:
Community Search:

Software Updates via MacUpdate

Adobe Photoshop Elements 13.0 - Consumer...
Adobe Photoshop Elements 12--the #1 selling consumer photo editing software--helps you edit pictures with powerful, easy-to-use options and share them via print, the web, Facebook, and more.Version... Read more
Skype 7.2.0.412 - Voice-over-internet ph...
Skype allows you to talk to friends, family and co-workers across the Internet without the inconvenience of long distance telephone charges. Using peer-to-peer data transmission technology, Skype... Read more
HoudahSpot 3.9.6 - Advanced file search...
HoudahSpot is a powerful file search tool built upon MacOS X Spotlight. Spotlight unleashed Create detailed queries to locate the exact file you need Narrow down searches. Zero in on files Save... Read more
RapidWeaver 6.0.3 - Create template-base...
RapidWeaver is a next-generation Web design application to help you easily create professional-looking Web sites in minutes. No knowledge of complex code is required, RapidWeaver will take care of... Read more
iPhoto Library Manager 4.1.10 - Manage m...
iPhoto Library Manager lets you organize your photos into multiple iPhoto libraries. Separate your high school and college photos from your latest summer vacation pictures. Or keep some photo... Read more
iExplorer 3.5.1.9 - View and transfer al...
iExplorer is an iPhone browser for Mac lets you view the files on your iOS device. By using a drag and drop interface, you can quickly copy files and folders between your Mac and your iPhone or... Read more
MacUpdate Desktop 6.0.3 - Discover and i...
MacUpdate Desktop 6 brings seamless 1-click installs and version updates to your Mac. With a free MacUpdate account and MacUpdate Desktop 6, Mac users can now install almost any Mac app on macupdate.... Read more
SteerMouse 4.2.2 - Powerful third-party...
SteerMouse is an advanced driver for USB and Bluetooth mice. It also supports Apple Mighty Mouse very well. SteerMouse can assign various functions to buttons that Apple's software does not allow,... Read more
iMazing 1.1 - Complete iOS device manage...
iMazing (was DiskAid) is the ultimate iOS device manager with capabilities far beyond what iTunes offers. With iMazing and your iOS device (iPhone, iPad, or iPod), you can: Copy music to and from... Read more
PopChar X 7.0 - Floating window shows av...
PopChar X helps you get the most out of your font collection. With its crystal-clear interface, PopChar X provides a frustration-free way to access any font's special characters. Expanded... Read more

Latest Forum Discussions

See All

Mystery Case Files: Dire Grove, Sacred G...
Mystery Case Files: Dire Grove, Sacred Grove HD Review By Jennifer Allen on November 28th, 2014 Our Rating: iPad Only App - Designed for the iPad A decent new installment for the popular Mystery Case Files series.   | Read more »
Castaway Paradise – Tips, Tricks, and St...
Ahoy there, castaways: Were you curious about our own thoughts regarding this pristine shipwreck? Check out our Castaway Paradise review! Castaway Paradise is out for iOS, finally giving mobile gamers the opportunity to enjoy the idyllic lifestyle... | Read more »
Castaway Paradise VIP Subs are on Sale f...
Castaway Paradise VIP Subs are on Sale for a Limited Time, and a Special Holiday Update is Coming Soon Posted by Rob Rich on November 28th, 2014 [ | Read more »
Primitive Review
Primitive Review By Jordan Minor on November 28th, 2014 Our Rating: :: FOLK ARTUniversal App - Designed for iPhone and iPad True to its name, Primitive is about as straightforward as runners get.   | Read more »
7 tips to get ahead of the competition i...
7 tips to get ahead of the competition in Dynasty of Dungeons Posted by Simon Reed on November 28th, 2014 [ permalink ] Playcrab has launched their action-packed new dungeon crawler, Dynasty of Dungeons, today. | Read more »
Master of Tea Kung Fu Review
Master of Tea Kung Fu Review By Jordan Minor on November 28th, 2014 Our Rating: :: ONE DROP RULESUniversal App - Designed for iPhone and iPad Master of Tea Kung Fu is a creative and complex caffeinated brawler.   | Read more »
Monster Strike Review
Monster Strike Review By Campbell Bird on November 28th, 2014 Our Rating: :: BILLIARD STRATEGYUniversal App - Designed for iPhone and iPad Collect monsters and battle by flinging them across the battlefield in this strangely... | Read more »
Proun+ Review
Proun+ Review By Jennifer Allen on November 28th, 2014 Our Rating: :: TWITCHY RACINGUniversal App - Designed for iPhone and iPad Twitchy racing aplenty in Proun+, an enjoyably tricky title.   | Read more »
Lucha Amigos (Games)
Lucha Amigos 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Forget Ninja Turtles, and meet Wrestlers Turtles! Crazier, Spicier and…Bouncier! Sling carapaces of 7 Luchadores to knock all... | Read more »
Record of Agarest War Zero (Games)
Record of Agarest War Zero 1.0 Device: iOS Universal Category: Games Price: $7.99, Version: 1.0 (iTunes) Description: HyperDevbox Holiday Turkey Black Friday Special Pricing! To celebrate the opening of the holiday season HyperDevbox... | Read more »

Price Scanner via MacPrices.net

Best Black Friday Deal: 15-inch Retina MacBoo...
 B&H Photo has the new 2014 15″ Retina MacBook Pros on sale for $300 off MSRP as part of their Black Friday sale. Shipping is free, and B&H charges NY sales tax only: - 15″ 2.2GHz Retina... Read more
Up To 75% Off Infovole Text Apps Over Black F...
Infovole’s entire range of apps, including the Textkraft family of word processors for iPads and iPhones, is being offered at 50-75% off over the Black Friday and Cyber Monday weekend. The five-day... Read more
Black Friday: Up to $60 off Mac minis, NY tax...
 B&H Photo has new 2014 Mac minis on sale for up to $60 off MSRP as part of their Black Friday sale. Shipping is free, and B&H charges NY sales tax only: - 1.4GHz Mac mini: $449.99 $50 off... Read more
Black Friday: 27-inch 5K iMac for $2299, save...
 B&H Photo continues to offer Black Friday sale prices on the 27″ 3.5GHz 5K iMac, in stock today and on sale for $2299 including free shipping plus NY sales tax only. Their price is $200 off MSRP... Read more
Karalux Announces 24K Gold-Plated iPhone 6
Karalux, a Vietnam-based jewellery firm, has launched a unique 24 karat gold-plated iPhone 6 version with gold-cast monolithic dragon on its back panel. The real 24 karat gold plated enclosure doesn’... Read more
Black Friday: 13-inch 2.6GHz Retina MacBook P...
 B&H Photo has lowered their price for the 13″ 2.6GHz/128GB Retina MacBook Pro to $1159 for Black Friday. That’s $140 off MSRP, and it’s the lowest price for this model (except for Apple’s $1099... Read more
View all the Black Friday sales on our Mac Pr...
We’ve updated our Mac Price Trackers with the latest information on prices, bundles, and availability on systems from Apple’s authorized internet/catalog resellers. View Black Friday sale prices at a... Read more
Black Friday: 11-inch MacBook Air for $779, s...
 Best Buy has lowered their price for the 2014 11″ 1.4GHz/128GB MacBook Air to $779.99 for Black Friday. That’s $120 off MSRP. Choose free shipping or free local store pickup (if available). Sale... Read more
Apple Store Black Friday sale for 2014: $100...
BLACK FRIDAY The Apple Store has posted their Black Friday deals for 2014. Receive a $100 PRODUCT(RED) branded iTunes gift card with the purchase of select Macs, $50 with iPads, and $25 with iPods,... Read more
Black Friday: 15% off iTunes Gift Cards
Staples is offering 15% off $50 and $100 iTunes Gift Cards on their online store as part of their Black Friday sale. Click here for more information. Shipping is free. Best Buy is offering $100... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Senior Event Manager, *Apple* Retail Market...
…This senior level position is responsible for leading and imagining the Apple Retail Team's global event strategy. Delivering an overarching brand story; in-store, Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.