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
$100.75
Apple Inc.
+0.64
MSFT
$46.36
Microsoft Corpora
-0.08
GOOG
$577.36
Google Inc.
+1.00

MacTech Search:
Community Search:

Software Updates via MacUpdate

QuickBooks 2015 16.0.0.1352 R1 - Financi...
QuickBooks 2015 helps you manage your business easily and efficiently. Organize your finances all in one place, track money going in and out of your business, and spot areas where you can save.... Read more
Mac DVDRipper Pro 5.0.1 - Copy, backup,...
Mac DVDRipper Pro is the DVD backup solution that lets you protect your DVDs from scratches, save your batteries by reading your movies from your hard disk, manage your collection with just a few... Read more
Apple OS X bash Update 1.0 - Fix for sec...
The OS X bash Update fixes a security flaw in the bash UNIX shell on OS X 10.9.5 (also on OS X 10.8 and 10.7 [see Related Links below]). OS X 10.9.5 or later Downloads for OS X 10.8 and OS X 10.7 in... Read more
SyncTwoFolders 2.0.5 - Syncs two user-sp...
SyncTwoFolders simply synchronizes two folders. It supports synchronization across mounted network drives and it is a possibility to run a simulation showing in a log what will be done. Please visit... Read more
FinderPop 2.5.7 - Classic Mac utility, n...
FinderPop is a Universal preference pane that extends OS X's contextual menus using a FinderPop Items folder much as the Apple Menu Items folder used to do for the Apple menu. It has other features... Read more
VueScan 9.4.45 - Scanner software with a...
VueScan is a scanning program that works with most high-quality flatbed and film scanners to produce scans that have excellent color fidelity and color balance. VueScan is easy to use, and has... Read more
LibreOffice 4.3.2.2 - Free Open Source o...
LibreOffice is an office suite (word processor, spreadsheet, presentations, drawing tool) compatible with other major office suites. The Document Foundation is coordinating development and... Read more
calibre 2.4 - Complete e-library managem...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Default Folder X 4.6.9b1 - Enhances Open...
Default Folder X attaches a toolbar to the right side of the Open and Save dialogs in any OS X-native application. The toolbar gives you fast access to various folders and commands. You just click... Read more
Beamer 2.0.4 - Stream any movie file fro...
Beamer streams to your Apple TV.... Plays any movie file - Just like the popular desktop movie players, Beamer accepts all common formats, codecs and resolutions. AVI, MKV, MOV, MP4, WMV, FLV. To... Read more

Latest Forum Discussions

See All

apeFilter (Music)
apeFilter 1.0 Device: iOS Universal Category: Music Price: $6.99, Version: 1.0 (iTunes) Description: | Read more »
Shred It! Review
Shred It! Review By Jennifer Allen on September 30th, 2014 Our Rating: :: GORGEOUS BUT BASICUniversal App - Designed for iPhone and iPad It might look lovely, but Shred It! is a pretty shallow endless runner/snowboarding game.   | Read more »
It Came From Canada: Angry Birds: Transf...
Anyone afraid that throwing Transformers into the Angry Birds mix would result in a Michael Bay-level of childhood pillaging can rest easy. While Rovio’s famous fowls may be a 21st century staple, Angry Birds: Transformers wears its affection for... | Read more »
Galaxy Trucker Review
Galaxy Trucker Review By Rob Thomas on September 30th, 2014 Our Rating: :: IN FOR THE LONG HAULiPad Only App - Designed for the iPad We got a great big convoy, rockin’ through the night… the endless night of outer space, that is.... | Read more »
Moon and Sun – children’s book Review
Moon and Sun – children’s book Review By Amy Solomon on September 30th, 2014 Our Rating: Moon and Sun is a fable-like children’s book with lush illustrations.   Developer: Marcio Monteiro Price: $3.99 Version: 1.0 App Reviewed on... | Read more »
Kairosoft Finally Brings The Pyraplex to...
Kairosoft Finally Brings The Pyraplex to iOS Posted by Jessica Fisher on September 30th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Yeti’s Parole Officer Review
Yeti’s Parole Officer Review By Jennifer Allen on September 30th, 2014 Our Rating: Universal App - Designed for iPhone and iPad Yeti’s Parole Officer proves that looks aren’t everything in this entertaining, if plain, piece of... | Read more »
Record Keeper and World Wide Words – Two...
Record Keeper and World Wide Words – Two New Final Fantasy Games Arrive on iOS in Japan Posted by Ellis Spice on September 30th, 2014 [ permalink ] | Read more »
iPollute Review
iPollute Review By Nadia Oxford on September 30th, 2014 Our Rating: :: iPOLLUTE, uPOLLUTEUniversal App - Designed for iPhone and iPad iPollute is a delightful-looking pollution simulator, though it’s a bit light on “game” content... | Read more »
This Week at 148Apps: September 22-26, 2...
Your Source For The Latest App Reviews   | Read more »

Price Scanner via MacPrices.net

MacBook Airs on sale for $100 off MSRP, start...
Best Buy has the new 2014 MacBook Airs on sale for $100 off MSRP on their online store. Choose free home shipping or free local store pickup (if available). Prices valid for online orders only, in-... Read more
Apple Releases OS X Mavericks bash Update 1.0...
Apple has released a patch update for OS X Mavericks users to address the recently-detected “Shellshock” security bug in BSD UNIX’s bash shell. Apple says only a few Mac users who had manually... Read more
Pivotal Payments Ready for Apple Pay – FlexPo...
Pivotal Payments, a provider of merchant services and global payment processing solutions, has announced its proprietary FlexPoint platform will support credit and debit transactions through Apple’s... Read more
iStabilizer Announces Tabarm — First Friction...
iStabilizer, a specialist in universal lightweight compact tripods, steady cams, dollies, mounts, and remotes for smartphones, tablets, and cameras, announced today the iStabilizer tabArm, the first... Read more
IStabilizer Flex Smartphone Tripod Wins Usa T...
iStabilizer, a specialist in universal lightweight compact tripods, steady cams, and other products for smartphones, tablets, and cameras, has announced today that its iStabilizer Flex smartphone... Read more
13-inch 2.8GHz Retina MacBook Pro on sale for...
B&H Photo has the new 2014 13″ 2.8GHz Retina MacBook Pro on sale for $1699.99 including free shipping plus NY sales tax only. They’ll also include free copies of Parallels Desktop and LoJack for... Read more
15-inch Retina MacBook Pros on sale for up to...
B&H Photo has the new 2014 15″ Retina MacBook Pros on sale for up to $150 off MSRP. Shipping is free, and B&H charges NY sales tax only. They’ll also include free copies of Parallels Desktop... Read more
Get Down to Business On Your iPad With Free N...
Utah based Poem LLC has introduced Nexticy 1.0, a full-featured, affordable (Free) forms application for iPad. Nexticy makes it ‘way easy’ to create, store, retrieve and analyze paper-like forms of... Read more
13-inch Retina MacBook Pros on sale for $100...
Best Buy has 13-inch 2.6GHz Retina MacBook Pros on sale for $100 off MSRP on their online store. Choose free shipping or free local store pickup (if available). Prices are for online orders only, in-... Read more
Reports Outline Claimed 12-Inch Macbook Air D...
Blogger Jack March says that according to information he’s received from an anonymous “source familiar with Apple’s plans,” the next-generation MacBook Air will launch in mid-2015 and be available... Read more

Jobs Board

*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* Retail - Multiple Positions (US) - A...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, 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* 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
Project Manager / Business Analyst, WW *Appl...
…a senior project manager / business analyst to work within our Worldwide Apple Fulfillment Operations and the Business Process Re-engineering team. This role will work Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.