Ask the Guru - CiteSeerX

94
Ask The Guru i Don Lancaster’s Ask the Guru Selected reprints volume III Computer Shopper series (January 1990 - present) Copyright 1992 by Don Lancaster and Synergetics Box 809, Thatcher, AZ 85552 (602) 428-4073 Book-on-Demand self-published using the Apple IIe computer and the LaserWriter NTX. All graphics were done in their entirety by ProDOS AppleWriter 2.1.

Transcript of Ask the Guru - CiteSeerX

Ask The Guru

i

Don Lancaster’s

Ask the Guru

Selected reprints — volume IIIComputer Shopper series (January 1990 - present)

Copyright 1992 by Don Lancaster and SynergeticsBox 809, Thatcher, AZ 85552 (602) 428-4073

Book-on-Demand self-published using the Apple IIe computerand the LaserWriter NTX. All graphics were done in theirentirety by ProDOS AppleWriter 2.1.

Ask The Guru

ii

Ask The Guru

iii

Introduction

And another volume bites the dust. Welcome to Volume III of our ongoing series ofedited and updated reprints from my Ask the Guru columns that originally appearedin Computer Shopper magazine. This volume begins with column #59, which first ranin January of 1990.

In the fall of 1989, Computer Shopper was sold to Ziff-Davis and moved to New York.At that time, very serious publishing problems began. Problems that included erraticAsk the Guru appearances, heavy-handed (and often dead wrong) editing,disappearance of manuscripts, appalling delays, loss of key Names & Numberssidebars, and really low printed figure quality.

My deepest and most profound apologies to those thousands of you readers who wererun over roughshod by these problems. While the worst of these seem to be easing atpresent, only time will tell. Sigh.

As a workaround, I have now given Ask the Guru a new identity and a new primaryhome on the GEnie information service under the PSRT PostScript RoundTable.Preprints of all columns, including exactly what I want to say and how I want to say it,along with all of the full high quality camera-ready illustrations are directly availableto you many months ahead of when the columns may or may not end up appearing inthe magazine.

As usual, these reprints are about most anything I happen to end up being interestedin. Recurring themes often do seem to include PostScript, laser printing, the Apple IIeand Macintosh computers, insider secrets that you are not supposed to find out about,thorough end-user long term product reviews, hardware and software hacks, emergingdesktop opportunities, off-the-wall resources, tinaja questing, and Book-on-demandpublishing.

Speaking of which, you are holding yet another example of my ongoing Book-on-demand publishing, a revolutionary new method in which books are produced onlywhen and as ordered. All of the figures, text, artwork, and everything you see here wasliterally beat out on a brick in my backyard by using an Apple IIe computer and theAppleWriter word processor. And done in astonishingly high speeds with outstandingeconomics.

A reminder here that I have a no-charge voice helpline available to you at (602)428-4073, and that you can get your GEnie PSRT voice connect info by dialing (800)638-9636.

-- Don LancasterJanuary, 1992

Ask The Guru

iv

About the Author

As he has said in his classic Incredible Secret Money Machine, DonLancaster writes books. And quests tinajas.

Microcomputer pioneer and guru Don Lancaster is now the author of 26books and countless articles. He is considered by some to be the father ofthe personal computer, for his early ground-breaking work with hackerdigital electronics and low cost video terminal displays. He is consideredby others to be the patron saint of the Walter Mitties of the world. And, heis considered by yet others to be the… er, I guess we better skip that one.

His monthly columns include both the Ask the Guru and LaserWriterCorner over in Computer Shopper, and his Hardware Hacker column inRadio Electronics magazine. He is also the Blatant Opportunist inMidnight Engineering.

Some of his other titles include his CMOS and his million-seller TTLCookbooks, Micro Cookbooks volumes I and II, Enhancing your Apple II,volumes I and II, the AppleWriter Cookbook, the Active Filter Cookbook,Apple Assembly Cookbook, his Ask the Guru and Hardware Hackerreprints, Don Lancaster’s PostScript Secrets, and his Intro to PostScriptvideo.

Don’s current software offerings include his PostScript Show and Tell, plusa few companion disks for his various books. He is also the sysop forGEnie PSRT, the leading PostScript BBS in the country, and a registereddeveloper for several leading edge technical firms.

Don is also the head honcho of Synergetics, a new-age design andconsulting firm that specializes in Apple computing, laser printing,PostScript program utilities, electronic prototyping, Book-on-demandpublishing, technical writing, and innovative software design. Hisavocations include firefighting, cave exploration, bicycling, and, of course,tinaja questing.

Don maintains a no charge voice helpline found at (602) 428-4073. Hewelcomes your calls and letters. Best calling times are 8-5 weekdays,Mountain Standard Time. ✦

Ask the Guru

v

more…

Table of Contents

5959 New Midnight EngineeringSome pad printing resourcesSuperstroking & RoundpathEPS Encapsulated PostScriptPrinted circuit breakthrough

6060 More on Bezier CurvesSecrets of Vinyl Lettering5,000:1 PostScript SpeedupA Third-Generation PrinterIBM/LaserWriter Interfacing

6161 Apple Fiesta DetailsBlackflashing SecretsUnderstanding EEXECMaking Flippity-FloppersStarting out with PostScript

6262 Adobe’s newest Black BookThe Pelsaer Binding ProcessType I Charstring InterpreterUsing PostScript Action TablesFinding An Effective Baud Rate

6363 PostScript font path grabberRubber stamp opportunitiesPerspective lettering routinesA hacker interchange standardNon-linear transformation ideas

6464 PostScript fractal fernsThe secret commons ployToners for T-Shirt printingShared SCSI comm speedupDuplex printing fundamentals

6565 PostScript point ruleApple to HP interfaceLow cost color optionsIID duplex printer testConverting Adobe files

6666 Papers and humidityGenerating histogramsMore on duplex printingHP PostScript CartridgesQMS Turbo PS820 review

6767 PS Perspective letteringIId duplex printing bugApple’s new CD releasesLaserWriter repair manualsSome telecomm adventures

6868 A new PostScript wish listUsing the Adobe DistilleryDouble distilled compilingGraphics on a Bezier surfaceMeals-in-minutes packaging

6969 Material Conversion SecretsEmergency Password RepairsBook-on-Demand PublishingLamination and Page ProtectionToner Cartridge Refilling Update

7070 PS Level II featuresStock history analyzerUnusual print materialsNew PostScript productsImproving toner durability

Ask the Guru

vi

Table of Contents, continued…

7171 The latest printer introsMac LC monitor optionsWorking with limited vmA PostScript menu justifyNetworking laser printers

7272 Low volume book publishersThat Apple IIe emulation cardVGA monitors and your Mac LCIncredible Secret Money MachineA serendipitous PostScript border

7373 Special education softwareLeast square fuzzy data fitsVideo compression schemesPostScript-to-anything ideasEmbroidery on the Macintosh

7474 Laser printer hard disksMac LC IIe card upgradeFlocks and flocking ideasAvoiding baud rate limitingStudying Click-to-Clunk times

Don Lancaster’s

ASK THE GURUJanuary, 1990

New Midnight EngineeringSome pad printing resourcesSuperstroking & RoundpathEPS Encapsulated PostScriptPrinted circuit breakthrough

59.1

Fig. 1 – Making PostScript direct toner printed circuits.

A thermal transfer toner image is PostScript laser printed onto a treated polyester sheet as a 1:1 reversed positive.

Heat and pressure fuse the toner directly to a thoroughly cleaned printed circuit board.

The pc board then gets etched in an ammonium persulfate sprayin the usual manner.

Apple has now been makingquite a few long-neededrepairs, adjustments and

corrections recently. On their IIgs,the very latest GS/OS 5.2 operatingsystem is now available by way ofyour local dealer or user group.

Besides correcting a fatal flawthat trashed disks and made GS/OStotally unusable, other correctionsand improvements have now beenadded. Once again, do not use theolder GS/OS 5.0 ever for anything,since it fatally trashes disks.

On the Quantum 3-1/2 inch harddrives that used superglue insteadof lubricant, the superglue is still in use, but the new ROM chip givesvery much more shove to the armmoving mechanism. There’s also anew "aerobic exerciser" that jumpsthe arm around every now and thento try and prevent lockups. Freeupgrades and an extended war-ranty are available on this.

Apple belatedly discovered thatthe design for their ImageWriter LQwas not even wrong. They have atlong last flushed this turkey forgood. They are now offering all LQowners an "upgrade" to the Laser-Writer SC for only $500, or are pro-viding other adjustments.

Which seems about the same tome as saying "Give me your ailingBMW and $500 cash, and we will putyou in a brand new Yugo." As wehave seen in past Guru columns,you could easily build your ownfake LaserWriter SC for around $500if anyone really wanted to. Since itlacks PostScript, I feel the -SC istotally useless.

The Personal AppleLink BBS pro-gram has been dropped completely,to disappear forever into the thirdparty "me-too" woodwork under aname of America On-Line. The "real"AppleLink remains available and asuseful as ever to developers, thedealers, user groups, and to anyserious individuals.

Apple is also newly making theirdealer’s product training packagesavailable directly to user groups atno charge. Contact your local clubfor more info.

As always, you’ll find user grouplistings here in Computer Shopper, orelse you can call (800) 538-9696, Ext500 for a complete rundown of allthe groups in your area.

One little-known yet outstandingApple publication is their Apple Li-brary Users Group Newsletter. These

fat and free monthly volumes arechock full of all sorts of goodies.

Roger Wagner sent me a reviewcopy of the latest upgrade to hisnew HyperStudio GS. Besides fixinga few teething bugs, this one is fullyGS/OS 5.2 compatible. As an ex-periment, I did turn the packageloose on two newer students whonever even saw a IIgs before anddid not have the slightest idea whathypermedia was. In just one classsession, they managed to produce a

59.2

ASK THE GURU

Fig. 2 – Some pad printing resources.

Pad printing: jack-of-all-trades in industrial decorating Steve Duccilli, Screen Printing, April 89, pp 63-71.

Pad geometry John Legat, Screen Printing, October 84, pp 92-96.

Pad printing equipment review Editors, Screen Printing, October 84, pp 103-106

An evaluation of a unique image transfer process Tamas Grecska, Screen Printing, October 84, pp 157-165.

Pad-transfer printing: soft touch in a tough market David Karlyn, Screen Printing, August 82, pp 100-104.

Looking at pad transfer printing Paul Wasserman, Screen Printing, October 79, pp 122-125.

rather sophisticated full color in-teractive on-line integrated circuitpinout directory. Not too shabby.

As I have said before, the triplecombo of the HyperStudio GS, Apple-Works 3.0, and the Apple Video Over-lay Card mentor programs should beable to give the IIgs new life andlead it upward and onward, where-ever that might end up being.

Adobe Systems has just released anew Mac-based Adobe Type Manager.This incredible $99 utility lets yousee real top quality PostScript fontson your screen and then print themto your ImageWriter or any other dotmatrix or inkjet printer. Onceinstalled, the ATM is invisible andfully automatic for pretty near anypopular Mac program. And since itis based on the outline-generatingtechnology, only a single downloadis needed for all font sizes.

The quality of all the ATM screenimages and dot matrix printouts arenow ridiculously better than before.ATM is definitely in the "Golly GeeMr. Science!" category.

There is a unique new magazinecalled Midnight Engineering whichshould be of crucial interest to anyand all of you now developing andmarketing your own hardware orsoftware. This one has a great andno-nonsense shoot from the hipstyle, is crammed full of real worldinsider secrets, and seems very

much cast into the Incredible SecretMoney Machine mold. Free samplesare available.

In addition, I’ve gathered most ofmy Blatant Opportunist columns intoa new set of Midnight EngineeringReprints. Call for info.

As a big reminder, this is yourcolumn and you can get technicalhelp and off-the-wall networkingper the end blurb. I do have a newand freebie laser printing insider re-sources brochure for you and I amnow shipping my brand new Laser-Writer Secrets book/disk combo.

Also per usual, all of the Namesand Numbers have been gatheredtogether into the end appendix.

Actually, I don’t really write thisstuff. All I do is let it out. We seemto have a mixed bag this month…

Tell Me About LowCost Printed Circuits

That magic of PostScript and anancient yet little known insider’ssecret can gang up to dramaticallysimplify making all of your low-endprinted circuit prototypes. In fact,you can now go from a cold start toa ready-to-etch circuit board in un-der a minute at a cost of a dime orless. And do so using nothing butyour favorite word processor.

The little known secret is thatlaser printer toner can make an out-standing etch resist. The only trick

is perfecting a technique to pre-cisely bond your toner onto yourcopper in the first place.

Use of PostScript means thatyou’re totally device independent,working with any old word pro-cessor on just about any brand ofcomputer. The software investmentcan be zero, over and above yourfavorite word processor or commprogram.

In the case of hacker pc boards inuser groups or hobby magazines,each end user can get their ownprinted listing or a BBS download.Instead of working with a third- orfourth-generation artwork copy,you give them precise layout in theexact form the author intended.

Figure one shows you several keysecrets of this direct toner process.You first get a PostScript textfile ofyour desired layout. You can do thison your own, by using my printedcircuit utilities, or by running thePostScript driver from a commercialCAD/CAM layout program.

You then run a paper checkingcopy with any suitable PostScriptprinter. For most uses, a 300 DPIprinter, such as a LaserWriter NT,will work just fine. Your imagemust be a 1:1 reversed positive, sothat left is right and black is foil.

Note that PostScript will let youaccurately rescale in either the X orY direction, should your first resultsnot end up precisely at 1:1.

The tricky part lies in getting theright kind of toner onto the correcttype of transfer material. Right now,this is still wide open, so you’ll wantto experiment bunches here. Threegood choices of transfer materialare: (A) polyester (mylar) overheadtransparency sheets, (B) the verysame sheets lightly overcoated withsome higher temperature mold re-lease such as the Miller-StephensonMS-136, or (C) a more stable and ahigher temperature aramide sheet,such as Kapton.

There are several choices fortoners. A good grade of third partyrefill graphics toner works well, asshould those new T-Shirt thermaltransfer toners. It also seems to be agood idea to use a "dry", (silicone oil

59.3

January, 1990

Fig. 3 – A PostScript roundpath utility.

% Copyright c 1989 by Don Lancaster and Synergetics, 746 First Street,% Box 809, Thatcher AZ 85552. (602) 428-4073. All commercial rights are% reserved. Personal use permitted so long as this header remains present% and intact. Show and Tell disk for Apple, Mac, or IBM costs $39.50.

/roundpath {/rpdata exch def /rprad exch def rpdata length 1 sub cvi /rppointsexch def rpdata 0 get rpdata 1 get moveto 2 2 rppoints 2 sub {/rpvalue exchdef 0 1 3 {rpdata exch rpvalue add get } for rprad arcto pop pop pop pop} forrpdata rppoints 1 sub get rpdata rppoints get lineto} def

% //// demos - remove before use. ////

200 300 translate 10 dup scale

gsave 15 6 translate 1 [ 0 0 -5 0 0 8.33 5 0 0 0] roundpath0.8 setlinewidth stroke grestore

gsave 15 3.5 translate -2.5 [0 0 -7 0 -7 12 7 12 7 0 0 0 ]roundpath 0.15 setlinewidth stroke

showpage quit

free) fusion wiper pad for severalcopies before each pc image.

Your bare printed circuit boardhas to be incredibly clean. Start outusing a thorough scouring with achlorine-based (Comet) cleanser,followed by a commercial coppercleaner, and then ending up with abrief etch and a wash in distilledwater. The board must be cleanedimmediately before use.

Properly cleaned copper allowsan unbroken stream of water to flowover it. It also will not be coppercolored at all – your board will in-stead be a uniform hot pink.

The crucial step is the actual tonertransfer. Tape the transfer sheet,toner side down onto your printedcircuit board. While an iron could intheory be used, you’ll get a farbetter result by using a Kroy Kolormachine or one of its imitators. Notethat you will get improved stability using a heated point source rollerthan by heating the entire sheet.

Preheating the copper up to 150degrees or so seems to be a goodidea. It also seems to be a good ideato rub an ice cube on the back of thetransfer sheet before peeling thesheet off the copper. An annealingbake of twenty seconds at 300 de-grees also seems to improve toneradhesion and etchant resistance.

Some users do seem to get perfectresults no matter what they try.With others, nothing works at all.Your goal here is to get an accurateand a dimensionally stable tonerimage securely bonded onto yourcopper, and zero toner left on thetransfer sheet.

Your final step is the usual etch.You should get the best results byusing ammonium persulfate at 120degrees and agitated by sloshing orusing an aquarium pump bubbler.A warming tray from a yard salemakes a good etchant heater.

Never etch face up! Always workvertically or face down. Only glassor plastic is allowed to ever contactthe etchant solution. Typical etchtime is twelve minutes or so. If ittakes you much longer than this,your temperature is far too low.

Naturally, ammonium persulfate

etchant is nasty stuff. This is anoxidant and sometimes includes apoisonous mercuric activator. Don’tdrink it. It slow burns any wood orother organics it comes in contactwith. You have to wear gloves andsafety glasses. Small quantities ofspent etchant can be disposed ofdown the drain, provided you firstdilute it using tremendous quan-tities of cold water.

Several resources on all this: Acomplete new low-end PostScriptprinted circuit layout package nowappears as part of my PostScriptShow and Tell. Lots of additionaldetails on the direct toner methodwere shown in the December 1989Radio-Electronics. That same issueshows you how to build a low cost

homemade etching tank.Two printed circuit trade journals

include Circuits Manufacturing andElectronic Packaging.

Suitable toners are available fromBlack Lightning, Don Thompson, orLazer Products. And, finally, printedcircuit bare boards and the sodiumpersulfate etchants are stocked bythe folks at Kepro.

As I’ve said, much of this is stillexperimental, so some playingaround will be needed to get topresults. Please let me know whatdoes and does not work for you.

What is EPS, or"Encapsulated PostScript"?

The Encapsulated PostScript, orEPS file is really no big deal. All it

59.4

ASK THE GURU

Fig. 4 – A PostScript superstroke utility.

% Copyright c 1989 by Don Lancaster and Synergetics, 746 First Street,% Box 809, Thatcher AZ 85552. (602) 428-4073. All commercial rights are% reserved. Personal use permitted so long as this header remains present% and intact. Show and Tell disk for Apple, Mac, or IBM costs $39.50.

/superstroke { save /sssnap exch def /sscmd exch def 0 2 sscmd length 2div cvi 1 sub 2 mul {/aposn exch def gsave sscmd aposn get setlinewidthsscmd aposn 1 add get setgray stroke grestore} for sssnap restorenewpath} def

% //// demos - remove before use. ////

200 300 translate 10 dup scale

106 45 {dup mul exch dup mul add 1.0 exch sub} setscreen

gsave 15 4 translate -6 0 moveto 12 0 rlineto 1 setlinecap [1 0 0.85 0.9]superstroke grestore

gsave /Bookman-Demi findfont [9 0 0 9 0 0] makefont setfont10 6 translate 0 0 moveto 10 0 rlineto 0 9 rlineto -10 0 rlineto closepath fill 1.21.5 moveto (R) false charpath [0.35 1 0.2 0] superstroke grestore

showpage quit

consists of is a segment of device-independent PostScript code thatcan be safely used by any largerPostScript application programs orother packages. This lets you moveany of your PostScript figures orillustrations into your pagemakingprograms, or otherwise link in-dividual bits and pieces into thelarger layout.

Let’s begin right at the horse’swhatever. The two key documentsyou need include the EncapsulatedPostScript File Specification, Version2.0, and that Document StructuringConventions Specification, version 2.1.Both of these are available free onrequest through Cynthia Johnson atAdobe Systems, or else through oneof the PostScript BBS systems.

The specs also appear in the new

Red Book II. You should not create oruse EPS files without having thesetwo documents on hand.

In general, all of the documentstructuring conventions are all vol-untary. The PostScript interpreterresiding in your printer will ignoreall of these comments and structure.Thus, some cooperation is neededbetween your exporting and yourimporting EPS code routines to letyou decide what’s genuinely need-ed and what is not.

As a general rule, any conformingdocument comment will begin witha %% or a %! and will be less than255 characters long. Any commentextensions are allowed with a %+comment line. Popular conformingcomments include the PostScriptversion number, the title, program

creator, the creation date, and so on.Other conforming comments couldget included for such esoteric thingsas the paper weight and color, andincluded fonts, files, and procs.

On to an EPS file. In its simplestform, an ordinary textfile is used.The only mandatory requirementsare this initial version line…

%!PS-Adobe-2.0 EPSF-2.0

and this size descriptor…

BoundingBox: LLx LLy URx URy

Here LLx is the distance in pointsfrom the left sheet edge to the leftside of your printed image. LLy isyour distance from the bottom sheetedge to the bottom of your printedimage. URx is the distance from theleft sheet edge to the right imageside and URy is the distance fromthe bottom sheet edge to your topimage limit.

Note that these numbers are com-pletely independent of any scaling,translation, or rotation system inuse within your EPS file. To findyour bounding box, you print yourfile and then measure all of thesedimensions in points upon yourprinted page. Use a standard pointrule to do this.

The purpose of a bounding box isto let an applications package knowhow big the "standard" size of theimage is, and just where it is to belocated from a reference point.

These two conforming comments are the only two actually required byan EPS file. The additional conform-ing comments could get added asneeded, or as requested by what-ever is importing the EPS file.

It’s suggested that all conform-ing comments be ended by a…

%%EndComments

final place marker.There are some restrictions to

what type of PostScript code getsallowed inside an EPS file. The codemust be well behaved, should bebracketed by a save and a restore andmust not do anything that wouldcorrupt what your importing pack-age is trying to do.

The PostScript EPS code should

59.5

January, 1990

Fig. 5 – A PostScript superinsidestroke utility.

% Copyright c 1989 by Don Lancaster and Synergetics, 746 First Street,% Box 809, Thatcher AZ 85552. (602) 428-4073. All commercial rights are% reserved. Personal use permitted so long as this header remains present% and intact. Show and Tell disk for Apple, Mac, or IBM costs $39.50.

/superinsidestroke {save clip /sssnap exch def /sscmd exch def 0 2 sscmdlength 2 div cvi 1 sub 2 mul {/aposn exch def gsave sscmd aposn get 2 mulsetlinewidth sscmd aposn 1 add get setgray stroke grestore} for sssnaprestore newpath} def

% //// demos - remove before use. ////

200 300 translate 10 dup scale

gsave 15 3 translate 1 [0 0 -7 0 -7 13 7 13 7 0 0 0 ] roundpath[0.7 0 0.5 1 0.35 0] superinsidestroke grestore

gsave /Bookman-Demi findfont [11 0 0 11 0 0] makefont setfont10 5 translate 0.6 0.7 moveto (R) false charpath [1.3 0 0.25 1 0.1 0]superinsidestroke grestore

showpage quit

involve one single page or smallerimage. These following commandsare not permitted, since they couldcorrupt the operation of your im-porting program…

noteinitclip

copypageerasepageexitservernulldeviceinitmatrixgrestoreallbanddeviceframedeviceinitgraphicsrenderbands

setpageparams

Several other obvious and device-specific operators are also no-no’s,such as those covered in the Laser-Writer white book. One obvious ex-ample is initializedisk.

In addition, the setscreen and set-transfer operators are allowed onlyif you carefully do save and restoreall the original screen and transferfunctions. Although the showpageoperator still is allowed in an EPStestfile, the importing program issupposed to be intelligent enoughto ignore it. One detailed exampleappears in the EPS notes.

The rules here are simple: Don’tdo anything that can mess up theimporting program. Do make surethe importing program can pick upexactly where it left off.

What I have just described is thetextfile form of an EPS file. Theseusually will be host independent. Itis also possible to include an EPS fileinto a device specific host program.This could get done to allow suchthings as non-PostScript screen im-ages and host specific code.

Examples of these would includeEPSF and PICT screen image files onthe Mac, and the TIFF files on the pcclones. Once again, get the originalEPS specs for further details.

Any More DetailsOn Pad Printing?

Well, maybe a few. As you recall,pad printing is an arcane and sneaky

process to full-color print onto suchspecialty objects as pens, golf balls,electronic keycaps, antique radiodials, classic car speedometers, oreven on eggshells.

Obviously, PostScript cries to becombined with some great new anddo-it-yourself home pad printingoperation, to open up whole newworlds of ultra low cost, lower endspecialty promotion products, solddirect and real time to the end userin sanely small quantities.

Here, briefly, is how pad printingworks: An engraved plate called acliche contains a flat and frontwardsimage of your artwork. Ink getsspread onto the plate and thendoctored off, leaving an ink image.Your ink image is picked up by aspecial shaped silicon rubber pad

and then transferred to the irregularobject being printed.

This transfer occurs because inkexposed to air creates a thin andtacky film. Initially, the tack sticksto the pad. During the pad motion, asecond and stronger tack builds upon the exposed surface, which letsthe ink stick to the final object betterthan it does the pad.

A nesting carrier can hold theobject you are printing. The shape ofthe pad is typically an involute ofyour final printing path, so that youcan produce a distortion-free result.Dozens of pad shapes and sizes arecommon. Several colors can even bedone at once.

So far, I haven’t found any tradejournal, ap-note or newsletter thatspecifically centers on pad printing.

59.6

ASK THE GURU

A free Incredible Secret Money Ma-chine to you if you find one.

At any rate, there is a fine ScreenPrinting trade journal that does anin-depth article on pad printingeach year or two whether it needs itor not. Screen Printing’s answer tome seems to be a Guru by the nameof Richard Greaves. Richard kindlysent me one reprint of everythingwhich Screen Printing has done onpad printing over the last decade.The list appears in figure two.

There appear to be several dozenpad printer manufacturers. Pricesare, of course, outrageously highsince this is an arcane specialty, andsince most of these are high volumeautomatic machines.

Of the article listings in figuretwo, Steve Ducilli’s shows the latestand best listing of manufacturersand prices.

One low-end pad printer systemis available from Basco, but I dobelieve that this particular beast isridiculously overpriced.

What if I ReallyWant to Get Arcane?

Hmmmm. Your next step aboveand beyond pad printing is an evenmore esoteric technology known asdiffusion transfer printing. Sort of theultimate in iron-on applique.

In diffusion transfer, full color inkis previously placed onto a transfermylar sheet. Heat and pressure thenvaporize the ink. The ink will thentransfer as a vapor and literally dif-fuses onto and into whatever it isyou are printing on. Since that inkactually enters into the intendedsubstrate, your final image can beextremely durable and literally cannot be rubbed off. On ceramics, theresult can even be fired.

The diffusion transfer printing iscoming on like gangbusters, but it iseven harder to get any insider infoon. Some ads occasionally appear inboth the free Design News and theAppliance trade journals.

Tellyawhat. For this month’s con-test, just contribute in some way toour low end pad printing or ourdiffusion transfer printing dialog.Remember that our goals here are a

PostScript based $50 do-it-yourselfmachine and a simple process thatlets you get filthy rich at a swapmeet. There’ll be an Incredible SecretMoney Machine book to the topdozen entries, plus an all-expensepaid (FOB Thatcher, AZ) tinaja questfor two to the very best.

What are This Month’sPostScript Utilities?

Let us have three of them thismonth. I will call them roundpath,superstroke, and superinsidestroke.They greatly simplify generating allsorts of special path and strokingeffects. While these are a minorportion of my PostScript utilities 13,you can easily add them to most anypackage you care to.

Let’s start with roundpath, foundin figure three. This one is able toautomatically round all the internalcorners of a fancy path to a fixedradius. To use roundpath, you createa radius value and use an array ofform -rad- [ x0 y0 x1 y1 x2 y2 ... xn yn ]roundpath.

Note that only the internal jointsof the path are rounded. The endsare not. If you want to round all thejoints of a closed figure, start at themiddle of some side and make x0equal xn and y0 equal yn, closing thepath. One useful trick is to pick anegative value for the radius. Thisgives you some unique inverse arcsat each corner.

Rather interesting effects can getcreated by multiple stroking a path.For instance, a rounded-end fatblack stroke overlaid by a thinnergray one creates an unusual under-line for use on any letterheads andresumes. In a wiring diagram, anoverwide white combined with awide black and a thinner white will give you a "white" wire that auto-matically breaks any other wires orother parts it happens to cross over.And, any charpath font charactersthat are multi-stroked can lead todouble outlines, litho spreads, andvarious "neon" effects.

The usual way to multiple strokeis to do a gsave, set your fattestlinewidth and gray, stroke, and thenget the path back again with a

grestore. Then you repeat the pro-cess for each successively thinnerline, ending up with the narrowestline. You do have to do the fatteststuff first; otherwise you’ll over-write your previous work.

The superstroke of figure four canautomate this process. You simplycreate an array of linewidth, graydata values and then do a [5 1 3 0 1.50.8] superstroke. In this specificexample, you first draw the white"background erasing" line as fivepoints wide using a white or onesetgray, followed by a three pointwide black line at a zero setgray,followed finally by the thin gray fillthat is 1.5 points thick.

A variation of superstroke is calledsuperinsidestroke and is shown asfigure five. This one first clips youto your original path boundary.While stroking gets attempted inexactly the same way as superstroke,only those portions of the lines lyinginside your boundary will actuallyappear on the final printed page.

Which could result in bordershaving variable linewidths, or elsesingle or multiple outlined fontswhich do not ever get any fatterthan their original size. Far betterthan the crude attempts usuallytried. Note that the linewidth youset is the width you print.

While incredibly powerful, thereare two main limitations to superin-sidestroke. One is that the print timecan get very long if there are curvesor other complexities forming yourclipping boundary. Especially withsuperinsidestroke. A second is thatlarger messages may have to bedone a single character at a time.

Several interesting results can begotten if you first create your pathusing roundpath and then multiplestroke your path by using eithersuperstroke or superinsidestroke.

These three operators are nowincluded in my PostScript Utilitiesversion 13. You can call for a freeprinted listing.

Experiment to see what you cancome up with on these. I think youwill find this new trio an incredibly powerful new suite of PostScripteveryday utilities. ❆

Don Lancaster’s

ASK THE GURUFebruary, 1990

Secrets of Vinyl Lettering5,000:1 PostScript SpeedupMore on the Bezier CurvesA Third-Generation PrinterIBM/LaserWriter Interfacing

60.1

Fig. 1 – An acceptable third generation PostScript printer.

1. The printer shall speak genuine Adobe PostScript and use fully hinted downloaded Type Ioutline fonts.

2. The resolution is to be 415 DPI with an alternate 415/830 mode that allows106 line halftonescreens of 35 gray levels. Full histogram equalization shall be available.

3. The repeat print speed will be at least12 pages per minute. Page makeready times shall bea minimum of 5 times faster than the LaserWriter NTX. A combination of new algorithms,software, and hardware is to be used for this speedup, including RISC-based or directPostScript hardware engine chips.

4. An absolutely straight paper path will be provided as an option, allowing no-nonsense handfeeding of thicker materials. At least two 400 sheet minimum paper trays shall be provided,capable of automatically feeding heavy cover stock.

5. Envelope print quality is to be substantially better than on previous printers. The fusionrollers are to be separately accessible for use with Kroy Kolor and laminating materials.

6. As extra price options, an11 x17 capability will be offered, as shall the ability to print tonerdirectly onto a1/16th inch thick printed circuit board material.

7. Toner costs shall not exceed 0.5 cents per printed side, and shall be third-party reducible tounder 0.2 cents per page. Toner cartridges must last a minimum of 10,000 copies and shallbe conveniently end-user refillable a minimum of twelve times. The photosensitive tonerdrum shall have a Mohs scale surface hardness of not less than 9.0. Any and all parts ofthe toner and charging system must be low in cost, easy to get, and simple to replace.

8. The printer shall, in a single feeding, be able to duplex print on both sides of a sheet ofpaper. All rollers and all paper paths shall be capable of handling any previously printedmaterial on a long-term basis. The reliability of the paper path and feeding mechanism shallbe good enough to allow unattended overnight printing of book-on-demand published titles.

9. A minimum of 150 high quality, fully hinted, and outline fonts will be standard, with otherfonts easily accessible as user-programmable EPROM cartridges and CD-ROM disks.

10. All descriptive font paths shall be available on all levels, including alterable plaintextrepresentations of downloaded Type I fonts. The font paths must be easily interceptableand modifiable for such things as perspective and similar lettering or other nonlineartransformations.

11. There shall be no secrecy. Everything on all levels must be fully documented, fullyunlocked, and fully available in plaintext form.

12. An optional hard disk shall have a fully documented, reliable, and user-friendly operatingsystem that does not blow up during routine use. All disk files and formats shall be totallySCSI standard and fully documented. A mix of up to eight disks and CD ROM devices shallbe allowed.

13. Provisions shall be made for direct hard disk access by the host, for the return of cachedfont characters to the host, and for use of the SCSI port as a direct and high speed datachannel. The font cache is to be totally separable from other disk files and directories.

14. Minimum memory expansion will be 16 megabytes, and provisions are to be made for dualbitmaps that allow one page to compose while the other is printing.

15. Service manuals exceeding current Hewlett-Packard quality standards shall be readilyavailable to the end user. These shall include full schematic diagrams, complete memorymaps, and fully disassembled ROM listings. All source code shall be optionally available.

16. A minimum of 500,000 copies are required before minor repairs or parts replacements areneeded. The machine is to last forever, simply by bolting on new parts.

17. A fully programmable video output of the final page bitmap shall be available. Any portion ofany and all bitmaps shall be returnable to the host for recording, in both "open" andrun-length encoded formats.

18. A compiling or pseudo-compiling provision is to be available that can dramatically speed uplater reuse of any page image. A user system monitor is to be provided that gives completeand total access to all code levels.

19. Large carrying handles must be provided. Mode switches shall be rugged and easilychanged. Toner density is to be adjustable from outside the machine. Unusual pageformats as large as 8-1/2 x 24 shall be supported.

20. The end-user street price is to be under $3499.

M eanwhile, consternationhad broken out amongall of those disgruntled

mutineers encamped in the oldEskimo village. Er, whoops. Wrongcolumn. Let’s try again…

Plans are underfoot for a majornew PostScript BBS board to openup on GEnie. The intent is to have atleast a thousand heavy-duty freedownloads, along with most of theroutines found in my Ask the Guru,LaserWriter Corner and my HardwareHacker columns. Its called PSRT.

Patches are at long last availablefor AppleWriter which let you havemuch longer resident textfiles onyour IIgs. These patches are handyfor downloading PostScript fonts.So far, the patches do seem to becompatible with Don Thompson’sWPL Toolkit and many of my ownpatches. The package is sharewarepriced at $29 and is available fromChester H. Page.

Sadly, Call A.P.P.L.E. has ceasedpublication after all these years. Myrecommended substitute would beTom Weishaar’s great A2 Central. Inyet another ominous development,Sierra On-Line announced they havediscontinued all future IIgs productdevelopment, citing the intolerablyfrustrating development tools andthe lack of sorely needed and longoverdue IIgs hardware upgrades.Sierra, of course, was one of thoseApple pioneers that long led thefield in all of the high resolutiongraphic adventures. Sierra intendsto continue to develop for all othermajor personal computers.

Over in the PostScript clone wars,Freedom of the Press has issued anupgrade that no longer breaks thetail off Meowwrrr, my PostScriptPuss de Resistance. But GoScript stillseems totally incapable of printingthe PostScript fractal ferns that welooked at several columns ago. Somuch for PostScript compatibility.

That Adobe Type Manager is going

60.2

ASK THE GURU

Fig. 2 – Six possible IBM to LaserWriter cables.

2

3

4

5

6

20

7

8

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

2

3

4

5

6

20

7

8

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

RS232DB25 female

RS232 DB25 male

IBMCom1

LaserWriter

2

3

4

5

6

20

7

8

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

3

2

7

8

6

4

5

1

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

RS232DB9 female

RS232 DB25 male

IBMCom1

LaserWriter

(NC)

2

3

4

5

6

20

7

8

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

5

9

4

8

7

2

3

6

TXD-

RXD-

TXD+

RXD+

HSK

+5V

SG

+12V

RS232DB25 female

RS423DB9 male

IBMCom1

LaserWriter

(NC)

3

2

7

8

6

4

5

1

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

5

9

4

8

7

2

3

6

TXD-

RXD-

TXD+

RXD+

HSK

+5V

SG

+12V

RS232DB9 female

RS423DB9 male

IBMCom1

LaserWriter

2

3

4

5

6

20

7

8

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

3

5

6

8

2

1

4

7

TXD-

RXD-

TXD+

RXD+

DSR

DTR

SG

DCD

(NC)

RS232DB25 female

RS423MiniDIN-8 male

IBMCom1

LaserWriter

(NC)

3

2

7

8

6

4

5

1

TXD

RXD

RTS

CTS

DSR

DTR

SG

DCD

3

5

6

8

2

1

4

7

TXD-

RXD-

TXD+

RXD+

DSR

DTR

SG

DCD

RS232DB9 female

RS423MiniDIN-8 male

IBMCom1

LaserWriter

gangbusters as the number one Macutility and is now pushing the halfmillion mark for unit sales. Onediscounting source is MacWarehouseat $53. The good news is that thisgem can stunningly improve screengraphics and higher resolution dotmatrix and most ink jet printouts.The bad news is that it only works

on Type I downloaded fonts, andthat it actually slightly degrades 10-and 12-point type on older Image-Writer printers. An IBM version ofthe ATM should be available soon.

Later versions of ATM fixed thisImagewriter bug.

As we have seen in our previouscolumns, Hewlett-Packard is one

outstanding source of repair andservice manuals for most of thoseApple LaserWriter products. Theyhave combined two of their olderCX manuals into their new part#02606-90920. Their SX manual re-mains part #33440-90904.

A reminder about the MidnightEngineering magazine for all of youdeveloping and marketing yourown low end hardware or software.By way of a special arrangement,free sample copies are available toComputer Shopper readers.

As always, this is your columnand you can get technical help andoff-the-wall networking by calling(602) 428-4073. I do have a new andfree laser printing insider resourcesbrochure just for you and I am nowshipping my brand new LaserWriterSecrets book and disk combo.

We seem to be into advancedtopics this month. So, I thoughtwe’d have us five really advancedcontests to go with them. There’ll beall the usual Incredible Secret MoneyMachine prizes for the dozen bestentries, along with an all expensepaid (FOB Thatcher, AZ) tinaja questfor two to the best of all.

For the first two contests, either(1) show me a way to use the SCSIport on the LaserWriter NTX as aridiculously faster AppleTalk sub-stitute, or else (2) show me a way tocompatibly timeshare a single harddisk between an NTX and a host ona real time basis. Be sure to sendyour entries directly to me, and notto the Computer Shopper editorial.On to the goodies…

What do You Really Want InA Third-Generation Printer?I never thought you would ask.

Dozens of manufacturers seem to beon the verge of releasing a bunch ofbrand new PostScript laser printers.Sadly, most of them seem about tooffer some monumentally stupidfeatures for precisely the wrongreasons. Arrghhh.

To try and head things off at thepass, figure one gives you the bareminimum specs for an acceptablethird-generation PostScript laserprinter. This is based upon your

60.3

February, 1990

Fig. 3 – Approximate length of a PostScript Bezier curve.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street, Box 809,% Thatcher AZ 85552. (602) 428-4073. All commercial rights reserved. Personal use permitted so% long as this header remains intact. Show and Tell disks for Apple, Mac, or IBM cost $39.50.

% Returns the approximate length of a selected Bezier curve to the host. Value /numpoints% determines the accuracy. 100 is usually good enough. Result /blength holds the final length,% usually to 0.1% accuracy For best results, use with the rubbergrid from my PostScript utilities.

/pcurveto {6 copy /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def /x1 exch defcurrentpoint /y0 exch def /x0 exch def curveto} def

/xtt {x3 x2 3 mul sub x1 3 mul add x0 sub tt 3 exp mul x2 3 mul x1 6 mul neg add x0 3 mul add ttdup mul mul add x1 3 mul x0 3 mul neg add tt mul add x0 add} def % x coefficients as f(t)

/ytt {y3 y2 3 mul sub y1 3 mul add y0 sub tt 3 exp mul y2 3 mul y1 6 mul neg add y0 3 mul add ttdup mul mul add y1 3 mul y0 3 mul neg add tt mul add y0 add} def % y coefficients as f(t)

/plotdots {01 numpoints1 sub div 1.00001 {/tt exch def newpath xtt ytt moveto 0 0 0.2 0 360 arc fill}for }def

/bezierlength {/oldx x0 def /oldy y0 def /blength 0 def 0 1 numpoints 1 sub div 1.0001 {/tt exch defxtt ytt /newy exch def /newx exch def newx oldx sub dup mul newy oldy sub dup mul add sqrtblength add /blength exch def /oldy newy def /oldx newx def} for }def % approximate curve withline segments

% //// demo - remove before use. ////

200 200 moveto 10 dup scale 1 setlinewidth 0 0 moveto1 18 9 -8 10 10 pcurveto stroke % substitute desired curve here

/numpoints 23 def plotdots bezierlength blength == flush showpage quit

helpline calls and requests, on myown needs, and on lengthly talkswith the other PostScript powerusers and developers. Every featureon this list is both technically andeconomically feasible here and now.

As I now see it, there are fourmain areas which severely crippletoday’s PostScript printers.…

The toner atrocity – There’s no sanereason why toner should cost morethan ink, nor any reason whatsoeverto exceed a toner cost of 0.2 cents perprinted page. Instead, we now havethese purposely undersized andoverpriced hard-to-refill Kamikazecartridges filled with excessivelyabrasive toner and an intentionallysoftened drum.

The font path paranoia – By de-priving power users of a simple anddirect access to the actual font pathsused, many PostScript routines areslowed down by several orders ofmagnitude. Fancier effects such asperspective or star wars letteringare made unduly difficult.

The speed debacle – Many of theperceived speed problems in Post-Script are caused by external has-sles. Things such as the lack ofdisplay PostScript on your host. Orthe sad absence of any direct SCSIreplacement for unbearably slowAppleTalk or other serial commchannels, the lack of any generalcompiling routines, excessive hostsoftware overhead, and the failureto properly interact between thePostScript printer and the host.

The bitmap obstinticity – Althougha device independence might be alaudable goal for PostScript, in noway should it get shoved downeveryone’s throat. By giving endusers direct and simple access toany and all bitmaps, such things asstep-and- repeat business cards canbe ridiculously sped up. A videooutput of the bitmap as it is beinggenerated would end up extremelyhandy for your debugging, and forfinding any slower portions of yourcode. The ability to compact andsave whole page bitmaps to CD-ROM would dramatically improve

any Book-on-Demand publishing.And finally, some programmableline-by-line bitmap output wouldopen up PostScript to previouslyunthunk of great opportunities,allowing a printer to interface tovirtually any other output device,however specialized or limited itsniche market.

Improving PostScript is kind ofan ongoing dialog around here, sobe sure to let me know what elseyou want to see in the way of anyprinter upgrades. We also offerprofessional services in this area.

Usually, all we need is an accuratesketch of what you want, sample

input and output, and a writtendescription of your problem. Theturnaround time is typically a fewweeks.

How About Another Round onIBM -to- PostScript Printer

Interface Problems?Here we go again. That helpline

keeps ringing off the hook with IBMto PostScript printer interface pro-blems. By far the overwhelmingmajority of these are caused by userinattention to detail…

"4073. Your PostScript helpline".

"Your #$@$#& Free Font will not

60.4

ASK THE GURU

Fig. 4 – PostScript proc cacheing guidelines.

Proc cacheing can give you a 12:1 up to a 3,000,000:1 speedup of yourPostScript routines for any computation-intensive image that is to bereused at least once. To cache a proc, you define that proc as a characterin a font, and then let the existing font machinery do the cacheing for you.

There are four possibilities…

(1) Font defined inside the job (speedup goes away with the job). (2) Font persistently downloaded (fast so long as power applied). (3) Font saved to NTX hard disk (stays fast until your disk blows up). (4) NTX hard disk bitmap returned to host (can be permanently fast).

And here are some use rules…

1. Open up your font cache as wide as possible by using a mark 1250n setcacheparams. The n value can be 48K (4 square inches) on a 3meg NTX up to 188K (16 square inches) on a 12 meg NTX. Forlarger images, you can use several characters side by side.

2. A font definition is not allowed to contain an image operator; or asetgray, setrgbcolor, sethsbcolor, settransfer, or setscreencommands. Because a font dictionary ends up read only, a "floating"dictionary has to be used for any internal save, restore, or defcommands.

3. One separate character needs to be created for each shade of grayin use. A white fill requires a separate mask as shown in figure five.

4. Use a font matrix of [1 0 0 1 0 0 ] and a point size of 1.0.

5. Font caches can be stored in run-length encoded format or as fullbitmaps. The run-length encoding often uses much less memorywith only a minor speed penalty. The m in mark m nsetcacheparams decides whether full bitmaps or run length encodingwill get used. To guarantee a bitmap, make m equal n. See the whitebook for details.

6. To verify that cacheing is taking place, run your routine twice, andmeasure the speed each time. Trip #2 should be ridiculously faster ifthe cache machinery really worked.

7. Should you get no image, this usually means you have inadvertentlysubstituted Courier at 1/1000th normal size and that something iswrong with your font definitions.

8. Fonts used to define your proc cache are not in themselves cached.

9. The needed cache size can be estimated by multiplying the height inpixels by the width in pixels and adding around a thousand bytes.With enough side-by-side characters, even an entire page can becached either in a bitmap or run length encoded form.

work on my PC clone".

"What PostScript error message doyou get back?"

"The lights blink for a while."

"What PostScript error message doyou get back?"

"Huh?"

Back to square one. Yes, an IBM ora PC clone will easily support anyPostScript laser printer, provided

you do follow a few common senserules. Firstoff, do not, under anycircumstances ever use a parallelinterface between your PC cloneand your PostScript laser printer. Todo so deprives you of crucial returnerror messages, severely limits whatyou can accomplish with your newPostScript language, and makes allof your printer drivers unbearablyrestrictive and klutzy.

Any software that only supportsPostScript parallel interface is, by

definition, defective and should beimmediately flushed.

Second, do not ever, under anycircumstances, try to print by copy-ing out your COM-1 port. Instead,always use a full duplex commchannel, such as PC Talk shareware,that lets you view your return errormessages and optionally record anyPostScript output returned to yourhost. While the typical parametersare 9600 baud, 8 data bits, 1 stop bit,and no parity, you can later makeyour interface go as fast as 57,600baud. Which is much faster thanmost parallel interfaces.

Third, be certain you do set up anXON / XOFF handshaking environ-ment. If your handshaking is setwrong, errors will often be pickedup after a page or two is printed.While you can, in theory, changeyour laser printer to do hardwirehandshaking, there is absolutely noreason to ever do so. Always useXON/XOFF handshakes.

Fourth, after you have set up areliable two-way serial communica-tions with full error reporting, youinstall a printing and stack dump-ing error trapper. You can get onefor $10 directly from Adobe Systems,pick one up off a BBS, find it in thegreen book, or else use the copy inmy PostScript Beginner Stuff.

A shareware version of Adobe’sEHANDLER.PS is also available asfile #196 on GEnie PSRT.

Cables. It is normally consideredproper form to have one betweenyour computer and a printer. Figuretwo shows you the six most popularIBM to LaserWriter cable lashups.

The six combinations result sinceyou can have a DB-25 or DB-9 con-nector on the host and a DB-25 usingRS-232-C or (depending upon yourLaserWriter model) a DB-9 or a MiniDIN-8 connector using the RS-423interface serial standard.

These cables are available ready-to-go through the Redmond Cable,folks among other sources.

Some general guidelines here, incase you are trying out somethingspecial. When using RS-232 at bothends, you want to use what the IBMfolks call a null modem, or what

60.5

February, 1990

Fig. 5 – A 5000:1 PostScript speedup example.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street, Box 809,% Thatcher AZ 85552. (602) 428-4073. All commercial rights are reserved. Personal use is% permitted so long as this header remains intact. Show and Tell disks cost $39.50.

% This is my good old poison ivy can label, modified so it will be legal as a pair of font% characters. Character (a) will be the white fill mask, while (b) will be the actual label…

/drawlabel {gsave stuffdict begin stuffdict exch /maskonly exch put stuffdict /overscan 1.0 put/pixellineremap {0 1 overscan mul pxpwidth 300 mul 72 div cvi {stuffdict exch /sline# exch putgsave gsave mappingproc newpath sline# 72 mul 300 div 0 moveto 0 pxpheight rlineto 0 0rlineto 0 pxpheight neg rlineto closepath clip newpath pixelproc grestore grestore} for} stuffdict 31 roll put /mappingproc {sline# .24 mul dup neg exch pxpwidth 2 div sub canwide div 114.6 muldup sin canwide 2 div mul exch 3 1 roll add exch cos 1 exch sub tiltangle sin canwide 2 div mulmul translate} stuffdict 3 1 roll put 94 18 translate stuffdict /tiltangle 14 put stuffdict /canhi 50tiltangle sin div put stuffdict /canwide 200 put /NewCenturySchlbk-Bold findfont [30 0 0 33 0 0]makefont setfont stuffdict /labelypos 8 put stuffdict /pxpwidth 238 put stuffdict /pxpheight 35 put0 canwide 2 div tiltangle sin mul neg labelypos add translate /pixelproc { 0 0 moveto 0 pxpheightrlineto pxpwidth 0 rlineto 0 pxpheight neg rlineto closepath maskonly {fill} {4 setlinewidth stroke12 6 moveto 1 0 (FREE FONT) ashow} ifelse} stuffdict 3 1 roll put pixellineremap end grestore}def

/stuffdict 50 dict def % a work place since internal def’s are a no-no

% This is a more or less standard custom font builder, except for the matrix size…

/newfont 200 dict def newfont begin /FontType 3 def /FontMatrix [1 0 0 1 0 0] def /fontBBox[0 0 188 54] def

/Encoding 256 array def 0 1 255 {Encoding exch /.notdef put} for Encoding dup (a) 0 get/canwhite put dup (b) 0 get /canfont put

/Metrics 15 dict def Metrics begin /canwhite 0 def /canfont 0 def end

/BBox 8 dict def BBox begin /.notdef [0 0 0 0] def /canwhite [0 0 188 54] def /canfont[0 0 188 54] def end

/CharacterDefs 10 dict def CharacterDefs begin /.notdef { } def /canwhite {true drawlabel} def/canfont {false drawlabel} def end

/BuildChar {0 begin /char exch def /fontdict exch def /charname fontdict /Encoding get char getdef fontdict begin Metrics charname get 0 BBox charname get aload pop setcachedeviceCharacterDefs charname get exec end end} def

/BuildChar load 0 3 dict put /UniqueID 1111 def end /CanFont newfont definefont pop

% //// demo - remove before use. ////

/CanFont findfont [1 0 0 1 0 0] makefont setfont/fullbitmap true def % false for run length encoded

fullbitmap {mark 50000 23050 setcacheparams}{mark 50 23050 setcacheparams} ifelse

200 200 moveto 1 setgray (a) show 0 setgray (b) show showpage % the slow one200 500 moveto 1 setgray (a) show 0 setgray (b) show showpage quit % absurdly faster

Apple will call a printer cable . Donote that your data channels andyour handshaking are crossed in thistype of cable.

IBM sometimes uses the RS-232-Cauxiliary handshake on pins 4 and 5.But these are rarely used elsewhereand are best locally self-jumpered.

When using RS-232 at the hostand RS-423 at the printer, note thatthe TXD- from the printer becomesRXD at your host, and that there isno connection to TXD+.

Note further that the transmitteddata out will go to RXD- and thatRXD+ must get grounded . Failure toground the differential RXD+ inputis far and away the most commonproblem on any RS-232 to RS-423interface. Watch this detail.

Instead of any custom cables, it isoften better to use a stock cable andadd a terminating "pin rearranger,"built up from a few short wires and a pair of Radio Shack male and fe-male connectors. A pair of loops of#14 house wiring can be used tosolder your two connector cases toeach other.

Please note that you definitelymust not ever use a "straight" or a"crossed" DB-9 to DB-9 cable, asyour connections will be wrong.

Also note that some PC clonecomm software may require a coldboot to change parameters. Duringyour initial debug, always do a coldreboot and make sure your printeris a solid green before any retry.

Additional details on laser printerinterface and debug appear in myLaserWriter Secrets , and the AppleWhite Book, otherwise known asthe LaserWriter Technical ReferenceManual . I do stock these.

Any More InfoOn Bezier Curves?

Lots of stuff. We do have a tinajaquest winner from our avuncularsleezoid contest. Michael Chaplinnot only picked up the football onthis one, but he ran out of the sta-dium and hasn’t been seen since.

Mike’s mind-blowing routines doinclude entire sleezoid alphabetsand incredible metamorphicallytweened sleezoid animation seq-

uences. Write him for details.It appears Hewlett-Packard has

picked up on avuncular sleezoids ina very big way. They have uppedtheir sleezoids to three dimensionsand now call them NURBS instead.Leave it to HP to abandon the in-dustry standard notation. A goodintroduction on this appeared in the

October 1989 issue of the ComputerGraphics Review .

I was sadly disappointed with theresults from our find-the-length-of-a-Bezier-curve contest. A fewmath freaks claimed that a Beziercurve does not have a length, since adiscontinuity is often possible. Andseveral of those other entries pretty

60.6

ASK THE GURU

much cancelled each other out.I am still convinced that a simple

closed expression for the length of aBezier curve exists and that this is atrivially easy one to derive, given acreative enough transformation.Only I just can’t seem to find it. So,for contest number three of thismonth, show me a closed formulafor the length of a Bezier or othercubic spline curve.

Meanwhile, figure three showsyou how to accurately approximatethe length of a Bezier curve. You dothis by using as many straight linesegments as you think you need andadding them up. Sort of a Simpson’s Rule versus Pythagoras and the Teen-age Mutant Ninja Night Nurses typeof thing. Since the points are closertogether along all of the "more bent"portions of the curve, the results aresurprisingly accurate. One hundredrapidly calculated points gets youwell under an 0.1 percent error formost curves. This is more than goodenough when you’re plotting pixels.

Tell me all AboutVinyl Lettering.

Toner sticks quite nicely to vinyl,which strongly suggests using yourLaserWriter and an X-Acto knife toreplace a $15,000 lettering machine.

Several tips here. Your vinyl mustbe carrier supported, and I wouldrecommend trimming at least one-quarter of an inch or more off eachedge before hand feeding. Yourcarrier itself should be preciselyprecut to 8-1/2 by 11 inches.

Dozens of sources for the vinyllettering materials often advertise inSignCraft magazine; one typicalsupplier would be Vinyl Express.The usual pricing is around 50 centsto a dollar per square foot.

There are dozens of nice colors,including exotics which simulateetched or frosted glass, chromes,reflectives, translucents, and lotsmore. Some are self-adhesive, whileothers use application tapes.

Other options include the Form-XFilms and the heavier static clingmaterials, such as those offered byJoseph Struhl. These are intended forlong-term sticking to glass and to

similar glossy surfaces simply bywetting the surface and squeege-ing them on.

Thicknesses vary from two to tenmils. I did seem to pick up some SXtransfer assembly problems after Ijammed a ten mil self-cling piece, soI would recommend either usingthe thinner materials, or else firstcreating a transfer pattern.

PostScript easily does backwardslettering by doing a -1 1 scale. Thislets you put the letters on the insideof the glass, where they should bemore vandal resistant. More detailson this in LaserWriter Secrets.

I keep hearing persistent rumorsof a magic new material which justmight revolutionize both sign-making and PostScript laser patternmaking in general. But every time Itry to chase this down it seems tovanish. Poof even.

The story goes like this: You takea sheet of a carrier-supported andlight-sensitive previnyl which is softand only partially chemically cross-linked. You run this through yourlaser printer, placing toner only onthe outlines needed.

Then you expose the pre-vinyl tothe sun or strong light, which inturn hardens and completes thecross-linking into a vinyl polymereverywhere the toner was absent.Then you wipe on some glop whichdissolves both your toner and theprevinyl under the toner. Presto. In-stant cut letters, ready for use.

A free Incredible Secret MoneyMachine if you can show me whereto get this magic material.

So, What’s the Cache?I was going to show you how to

double or triple your speed for thismonth’s PostScript utility, but it ap-pears our demo example ended upwith a 5,000:1 speedup instead.

Adjectives such as "adequate" im-mediately come to mind.

I call my secret new techniqueproc cacheing, and it could work onany PostScript procedure that youwant to reprint at least once at thesame size at some future time. It isparticularly good when used withany computation-intensive routines

which involve irregular clippingintervals, custom logos, fancy fontfootwork, any extensive non-lineartransformations, your curve-tracedsignatures, repeated randomizing,or extensive fractals.

Proc cacheing is more or less free,since all it requires is some re-thinking and a modest change ortwo in your programming style.While it works best on the NTX witha hard disk, you can apply it to anyPostScript laser printer. You caneven use your proc cacheing tocapture and save your bitmap of an entire page.

PostScript has a built-in font cachewhich converts the outline des-criptions of all fonts into bitmapsfor later reuse. All you have to do toproc cache is define your PostScriptprocedure as one or more characters in acustom font! Any repeated use ofyour proc is then done as a bitmap,rather than by recalculating every-thing all over again. The typical runtime speedups will range from 12:1to 3,000,000:1.

Figure four summarizes the keyproc cacheing rules, while a detailedexample appears in figure five.

There are four major ways to useproc cacheing…

(A) You can define your font onlyinside your job, in which case theproc cacheing goes away with thejob. This gets handy for all 12-upbusiness cards where you do notwant to permanently tie up anymemory, or are using an older ma-chine with limited memory.

(B) You can persistently down-load your font, so that the proccacheing remains as long as poweris applied. This does reserve somecache memory, and using lots ofnew fonts may in fact overwriteyour proc cache.

(C) You can let the NTX hard diskautomatically grab your proc cache.It will keep the bitmap for you untilthe next time your hard disk blowsup. Your font should also be savedto disk for proper operation.

(D) You can read all your bitmapssaved to the NTX hard disk and

60.7

February, 1990

return them back to your host forrecording. They appear on yourdirectory as FC type textfiles. Whichwill give you a permanently fastversion of your routine. This finalroute is especially attractive forBook-on-Demand publishing.

At any rate, your standard fontcacheing is controlled by a mark 125012500 setcacheparams. Those 12500bytes equal 12500 x 8 = 100,000pixels, and sets a maximum possiblesize for any bitmap to be cached.

There are often two font cacheingmechanisms used. One generates areal bitmap, while the other uses aslower run length encoding, whichproduces a fairly fast image whileusing much less memory. The 1250in the above example decides whento switch from real bitmaps into arun length encoding. The 1250 byteswill equal 1250 x 8 = 10,000 pixels.

Now, the total number of pixelsper character bitmap will equal theheight in pixels times the width inpixels. Assuming a square boun-ding box, the square root of thebitmap size gives us the height ofthe character. In this stock example,we could use real bitmaps up to 100pixels high (or 24 points at 300 DPI).The run length encoding is used upto 316 pixels high (or 76 points at 300DPI). Any of the characters largerthan this will not go into the fontcache, but will get recalculated eachand every time.

Obviously, we need larger imagesthan these to be really useful. Theallowable maximum size for n inmark m n setcacheparams can changewith the available printer memory.To find your limit, just keep onincreasing n until you get a limit-check error. On the 3 Megabyte NTX,you’re allowed an n value around48,000, which will translate into abounding box of four square inches.

This quadruples to sixteen squareinches on an NTX having a full 12Megabytes installed.

These font cache size limits aren’tnearly as bad as they sound. Notethat you only have to proc cacheyour tightly trimmed slow stuff,which is often much smaller thanyour entire image. You are also free

to use as many characters as youneed to build up your full image.

Do note that as few as a mere sixcharacters can proc cache an entirepage bitmap when using a "full"NTX. Finally, note that you mightuse a full NTX to do all your proccacheing, return the results to yourhost, and then rerun the final resultson any old PostScript printer of anymemory size.

There are several subtle gotchas,though. The only goal of your procmust be to make marks on the page.To qualify for font cacheing, yourproc descriptions must not have anysetgray, sethsbcolor, setrgbcolor, set-transfer, setscreen, or any image callspresent in them.

Since a font dictionary gets maderead-only during its processing, youwill have to provide an internal"floating dictionary" or two if youwant to use a save, restore, or a defcommand. Otherwise, you will getone or more of the invalidaccess errormessages.

So how do you handle grays orwhite fills? Simply by using a fewadditional characters. You use onecharacter as a mask for each black,gray, or white level as needed. Ourexample of figure five uses the (a)character to erase the background towhite and then overwrites the (b)character on top of it to create theactual label. Obviously, you do haveto put the characters down in theproper sequence and in the correctcolors to get the desired final result.

Two other differences betweenthe proc cacheing and a "real" font:You use a font matrix of [1 0 0 1 0 0]and a point size of 1.0.

Because of pixel line remappingand all of the intensive non-lineartransformations, the wraparoundisometric label would normallyprint in 70 seconds on an NTX. As arun length encoded cache, it printsin 83 milliseconds. As a cachedbitmap, it prints in 14 milliseconds.That’s a speedup of 5,000:1. Which isnot half bad for an amateur. Notethat 6:1 speed penalty of your runlength encoding over using the fullbitmap. No big deal.

Your own speedups will depend

on how calculation-intensive yourproc is, and can range from a low of12:1 for a simple 12-up businesscard, on up to several million to oneor more for a fractal landscape.

Very handily, any other fontsused internally to create your procfont are not in themselves cached.Which can eliminate a major sourceof NTX hard disk blowups on suchthings as perspective letters. It canalso slow down your first proc-as-a-font runtime, so watch this detail.

Some black magic does appear in-volved in tricking the NTX harddisk to actually cache your proc,even after it is obviously in the RAMcache in printer memory. Try (A)Persistently downloading your newproc, (B) Running your proc, alongwith a dozen standard font char-acters in an unused and oddballsize; and then (C) Issuing a control-cto force a hard disk cache update,saving your proc.

I suspect this has something to dowith Type 3 versus Type 1 Fonts. Letme know if you can come up withsomething better here, or at least anexplanation of what is going on.

Once again, you can use severalcharacters side by side for the largerimages, and you can even cache anentire page as a nearly instant print-ing bitmap.

The newly announced PostScriptlevel II does include several easy touse proc cacheing features. Theseare included in their forms and userpath operators. More on this as thecode becomes available.

Most of the PostScript routinesyou see here are now available onour new GEnie PSRT roundtable, inready-to-run formats. You can call(800) 638-9636 for voice connect info.You can also get my Ask the Gurucolumn preprints here as well.

As our final two contests for thismonth, either (4) show me a disgus-tingly sneaky new use for my proccacheing, or else for you super-gonzo PostScript folks out there, (5)find me a buyer for an 81 VW vanwith a mere 148,000 off-road mileson it. This last one really has got mestumped.

Let’s hear from you. ❆

Don Lancaster’s

ASK THE GURUMarch, 1990

Apple Fiesta DetailsBlackflashing Secrets

Understanding EEXECMaking Flippity-Floppers

Starting out with PostScript

61.1

Fig. 1 – How to make a Flippity-Flopper.

YESNO

VELCRO

DOT

VELCRO

DOT

CLEAR MYLAR

OR POLYESTER

ADHESIVE STOCK

BRIGHT GREEN

BUMPERSTICKER

ADHESIVE STOCK

CARDBOARD

OR ACETATE

CENTER CORE

BRIGHT RED

BUMPERSTICKER

ADHESIVE STOCK

CLEAR MYLAR

OR POLYESTER

ADHESIVE STOCK

T his year’s Apple Fiesta willbe held June 16, 17, and 18that the Tempe, AZ Mission

Palms Resort. As usual, this will beone of the finest club-sponsoredregional shows anywhere and willinclude exhibits, workshops, andseminars of interest on Apple, Mac,PostScript, user groups, and ondesktop publishing.

Also as usual, I’ll be there talkingon PostScript and Book-on-Demandpublishing, while Bee might do aworkshop or two on high tech op-portunities for the working artist.Be sure to stop in and visit.

Cost for the weekend is around$20 and special off-season roomrates are available. For any furtherdetails on this Apple Fiesta, contactJerry Cline at (602) 992-7035.

Apple has a new slick magazinetitled Develop that now includes aCD-ROM disk chock full of technotes and new developer info.

Included is that new Apple IIDynamo code plus bunches of old

and new Mac stuff. Price is $30 peryear if you are not already an Appledeveloper. You can contact APDAfor more details.

The earlier versions of the AppleCD-ROM drive apparently include acurious flaw. It seems the fan blewenough dirt onto the optics to foulthem up. Their latest version doesnot have a fan, and a repair and anew upgrade policy has been an-nounced. See your dealer for info.

Apple also offers a "one-unit-only" bargain price on these drivesfor user groups, dealers, and fordevelopers. Expect the majority offuture Apple system software andtechnical info to appear exclusivelyon CD-ROM.

A reminder that there should be amajor new and highly independentPostScript board up on Genie by thetime you read this. Page 835.

Adobe Systems just released aninteresting new program called TheDistillery and newly added to theirdeveloper’s disks for both Mac and

IBM. This one can do a pseudo-compiling which gets returned toyour host for recording. It verysubstantially speeds up and oftencan shorten most PostScript code.Obviously, it is intended for thoseapplications where you want torerun your code at least once.

Word has it that there is a fairlyserious teething problem in the newlow end 4-PPM laser printers as nowbeing offered by Canon, H-P, and,someday soon, by Apple. This caninvolve an overheating of the fusionrollers and/or the power supply. Afew fires have resulted.

A fix is certainly in the works andwill probably be in place by the timeyou read this. For now, if you ownone of these printers, do not run itunattended and do keep a Halon fireextinguisher handy. See your dealerfor further upgrade info.

Specifically, look out for an Error50 message on your Hewlett-PackardLaserjet IIP. Disconnect your powerimmediately should this occur.

Yes, all these smaller laser printercartridges can be refilled. Two of theusual sources for supplies, tools,and materials include Lazer Productsand Don Thompson.

Let’s see. I am now shipping mynew Don Lancaster’s LaserWriter Se-crets book/disk combo. Call me perthe end blurb for more info.

On to a matter of great import…

What is a Flippity-Flopper?Very rarely can Computer Shopper

reveal any emerging grest new tech-nological concept so profound thatthe entire future of our WesternCivilization hinges on it. Life in theuniverse as we know it will never bethe same.

Not to mention that you can alsomake a buck on it at a swap meet.

Figure one shows you the details.A Flippity-Flopper is a two sided diskthat sticks on either side to a velcrodot that’s itself stuck on whatever.

61.2

March, 1990

Fig. 2 – How PostScript ’s eexec operator works.

0 1 0 1 0 1 1 1

1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0

1 0 0 1 1 1 1 0

EOR

1 0 0 1 1 1 1 0

0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 1

TO HEX ASCII EQUALS

1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0

1 0 0 1 1 1 1 0PLUS

1 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0

1 1 0 0 1 1 1 0 0 1 1 0 1 1 0 1TIMES

0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 0

0 1 0 1 1 0 0 0 1 0 1 1 1 1 1 1PLUS

0 1 1 0 1 1 0 0 1 0 0 1 1 0 1 1

A byte from the input plaintextfile first gets exclusive-OR’edagainst the upper eight bits ofa sixteen bit pseudorandomsequence generator mask.

The encrypted result byte getsconverted to an ASCII hex pairand saved to an output file.

A new pseudorandom maskvalue is calculated by addingthe present encrypted databyte, multiplying by one magicnumber and adding a secondmagic number.

This new mask value will thenget used to encrypt the nextplaintext byte from your inputfile. Operation continues untilall input bytes get converted.

Usually, there will be a "red" sidewith a red message and a "green"side holding a green message. I useone as a warning on my NTX not touse a brand new toner cartridge foranything except camera-ready copy.Obvious other places to stick yourvery own custom Flippity-Floppersare on refrigerators, dishwashers,medicine cabinets, and employeein/out boards.

The standard size of a M1A1 Rev7.03 Flippity-Flopper is 2-3/ 4 inches indiameter, because that’s the size ofthe standard circle cutter that getsprovided with that Badge-A-Minitbadgemaking kit. Your core couldbe cardboard, rigid vinyl, or heavyacetate. The red and green sides arefluorescent bumpersticker sheetsfrom Paper Plus. The optional plasticoverlay can be self-stick acetate orpolyester.

Naturally, you PostScript laserprint all the custom text and graphicmessages to suit whatever uses you care to. You might want to offer astandard and custom mix.

Let me know what other uses youcan come up with for these.

How Do I Really GetStarted Using PostScript?

I overwhelmingly prefer to workdirectly in "raw" PostScript, byusing standard ASCII textfiles in thenon-WYSIWYG environment. I dofind this lets me explore lots of newPostScript ideas and uses whichsimply are not apparent in a can-ned pagemaking or an illustrationenvironment.

And since what you get is whatyou get with raw PostScript, there’snever any rude surprises along theway. Well, hardly ever.

I likewise force my students towork in raw PostScript. Apparentlyit works, since many of my rankbeginning off-the-street studentsroutinely end up doing award win-ning graphics after a few hours ofhands-on time.

Just how can you get started ex-ploring "raw" PostScript?

First and foremost, you mightwant to pick up Adobe’s blue andred books, otherwise known as the

PostScript Tutorial and Cookbook andthe PostScript Reference Manual II.I’m also laboring under the delusionthat my PostScript Beginner Stuff, myPostScript Show and Tell, and myLaserWriter Secrets book and diskpackages might be of use.

The details on where you go fromhere will depend very much uponyour choice of host computer. Ingeneral, you’ll want to set up aninteractive and two-way commenvironment that lets you receivereturn error messages and thenoptionally record any PostScriptcode returned to your host.

From there, you’ll usually want tocreate your own custom PostScriptfiles by using your favorite wordprocessor, but being very careful toalways save your final files in astandard ASCII textfile form. Thosefiles then get sent via your two-waycomm setup.

NOTE: In the text that follows, [T]means [control]-T, etc…

For your very first experiment,I’d recommend a file consisting of a

few carriage returns, the messageshowpage one word and all lowercase, several more carriage returns,your middle name, several morecarriage returns, and either a [D](preferred) or else an ending quitcommand. Save this as an ordinaryASCII textfile under a filename ofshowpage.tst.

Note that quit is not nearly asgood as [D], since quit only works ifyou reach it, while [D] works, erroror not.

This file gives you a quick checkon your normal PostScript lashup. Itshould initially eject a blank page,followed up by the display of anerror message on the screen of yourhost computer. Do not ever attemptany PostScript work unless you firstget showpage.tst to work!

From there, begin with the simpleexercises in the middle of the bluebook, starting with number two.First run each excercise as is, thenmodify it slightly, and finally goahead and customize it.

Let’s start with the Mac. There are

61.3

ASK THE GURU

Fig. 3 – Creating your own PostScript eexec file.

/mask 16#D971 def /mult 16#CE6D def /mult1 16#6000 def/mult2 16#6E6D def /adder 16#58BF def /strrx (X) def/char 32 def /trunc16 {16#FFFF and} def /hexvalues (0123456789ABCDEF)def

/printashex {cvi /vall exch def vall 16 div cvi hexvalues exch 1 getinterval printvall 15 and hexvalues exch 1 getinterval print flush 20 {37 sin pop} repeatformatcount 1 add 32 eq {(n) print flush 100 {37 sin pop} repeat} if/formatcount formatcount 1 add cvi 31 and def} def

/makeeexecfile {/formatcount 0 def 4 {char mask -8 bitshift or char mask -8bitshift and not and /echar exch def echar printashex flush 15 {37 sin pop}repeat mask echar add dup mult1 mul trunc16 exch mult2 mul trunc16 addtrunc16 adder add trunc16 /mask exch def} repeat {currentfile strrx readstring{0 get /char exch def char mask -8 bitshift or char mask -8 bitshift and not and/echar exch def echar printashex flush 15 {37 sin pop} repeat mask echar adddup mult1 mul trunc16 exch mult2 mul trunc16 add trunc16 adder addtrunc16 /mask exch def}{pop exit} ifelse} loop} def

% //// demo - remove before use. ////

1500 {37 sin pop} repeat

% Here is the expected result ...

% F983EF00C334F148421509DC30FA053D6DD4273E416E6A2EA64F917B5D20E111% 9F220AF8FC50D545AB51A0D18B6DD7543D27A21CD55887C1C7D51608F6A316EE% 8891D92A6E0D09D1D039159DA3A0781E1380B1228C

makeeexecfile0 0 moveto 1000 0 rlineto 0 1000 rlineto -1000 0 rlineto closepath fillshowpage quit

two methods of communicatinghere, either AppleTalk or serial.Note that an ordinary printer cablecan replace the AppleTalk cables, solong as you are using a single Macand both it and your LaserWriterare plugged into the same groundedac outlet. Note also that AppleTalkis not significantly faster than us-ing ordinary serial comm for mostPostScript users.

At any rate, if you want to useAppleTalk, get a copy of the AdobeFont Downloader, or a copy of SendPS . These are available cheaply orfree from Adobe, off all of the usualbulletin boards, or from me.

Be certain to use your chooser toconnect AppleTalk and then select aLaserWriter or whatever before youbegin. To download a PostScriptfile, double click on the Adobe FontDownloader, check the Status for anidle message, then pick the DownloadPostScript File box. Finally, you’lldouble-click on your text file totransmit it. The file should do its

thing, and any error messages orreturned info should appear on thehost screen.

Be sure to remember to use yourSave As option inside your wordprocessor to create standard ASCIItextfiles. Also be certain to entercarriage returns at the end of eachparagraph when you are importinga standard textfile back into yourword processor.

Should you prefer to run serialinstead, just use a two-way commprogram such as FreeTerm. Select9600 baud, 8 data bits, 1 stop bit, noparity and XON/XOFF handshakingactivated. Just grab your textfilesand transmit them.

Serial comm is a very good choicewhenever you are recording longerreturned messages.

Some applications packages makeit quite difficult to use Mac serialcommunications. One aid that canease this problem is that $14 Asyn-chronous LaserWriter Driver diskfrom APDA.

Another trick that should work isOption-F that will dump your Post-Script output to the disk. That disktextfile can then be sent serially.

On the IBM and clones, the twousual fatal mistakes people make istrying to use their parallel printerport, or failing to properly set upthe two-way XON/XOFF serial com-munications. We’ve seen details onthis last month, but here’s a quickreview…

Select a comm program such asCrossTalk, picking up 9600 baud, 8data bits, 1 stop bit, no parity, nooutput filtering and the XON/XOFFhandshaking activated. Check yourstatus with a [T]. Note that you mustbe Idle when sending a new file. Ifnecessary, force resets with a [C] [D][C] from your keyboard. Never senda new file unless your LaserWriteris idle or solid green.

On the Apple IIe and IIgs, I quitestrongly recommend using Apple-Writer and a Super Serial card. Topreset your baud rate, use [O]-J 19600,7,N,2 and then activate yourXON/XOFF comm handshaking bystarting all your files with thismagic incantation…

% [I] X E % [I] Z

Select some "wide open" printconstants by setting LM=0, PM=0,RM=240, TM=0, BM=0, PN=0, PL=66,PI=66, LI=1, SP=0, PD=1, CR=1, notop line, no bottom line, and a LJjustify. Next, set up a glossary keythat combines a printing with aswitch into your modem receivemode. This fake full duplex shouldgive you most of your return errormessages most of the time.

When in the [Q]-I modem receivemode, a [T] from your keyboardwill inquire your status, while a[C][D][C] will force a reset.

I personally use an honest 57600baud out the game paddle port ofmy Apple IIe. This is around seventimes faster than earlier versions ofAppleTalk. The overhead time iszero since the file management isdone as part of the interbit delaytimes. Let me know if you needmore on this.

61.4

March, 1990

Fig. 4 – Testing your eexec file of figure three.

% This tests the sample file created by the makeeexecfile demo of figure three.% It should eject one black page if correct…

currentfile eexecF983EF00C334F148421509DC30FA053D6DD4273E416E6A2EA64F917B5D20E1119F220AF8FC50D545AB51A0D18B6DD7543D27A21CD55887C1C7D51608F6A316EE8891D92A6E0D09D1D039159DA3A0781E1380B1228C

On other host computers, yourrules are the same. Create and saveyour PostScript program code asstandard ASCII textfiles by using asuitable editor or word processor.Then send these files over two-wayserial comm channels that have anXON/XOFF handshaking properlyactivated.

Do not ever attempt anything inPostScript on any system that does notgive you full two-way comm and on-screen error messages.

Serial communication with yourLaserWriter can later run as fast as57600 baud. You do, of course, haveto keep both ends at the same speed.You also have to be certain yourde-facto baud rate is somewherenear your selected one. Ratheroften, overhead and handshakingwill dramatically slow down yourcomm channels far under the sel-ected baud rate.

If at all possible, end your fileswith a [D] end-of-file marker. Orelse use the PostScript quit com-mand. But note that quit can’t reseta previous error, while [D] can.

Some word processors, especiallythose on a Mac, make it inordinatelydifficult to embed viewable controlcharacters into your PostScript files.Avoid these programs at all costs. Ifyou must, note that PostScript willaccept an escape character as " \033"and so on. A reverse slash followedby an octal value enters that valueas printable characters. More detailsin the red book.

If your word processor tries toforce carriage returns every nowand then, shorten all text lines asneeded with the " \ [return]". An anexample, AppleWriter will try toforce a return every 240 charactersin a long paragraph. Just throw inthat " \[return]" every 200 charac-ters or so. Good old WPL can do thisautomatically for you.

Once you have your two waycomm up and reliably working, youprobably would want to install aprinting error trapper. The bigadvantage here is that your file getsprinted out up to the time the errorwas made. Again, the error trappersare available free or cheaply from

Adobe, off many BBS systems, orfrom me or PSRT.

Under no circumstances should aprinting error trapper be used as areplacement for two-way comm andon-screen error messages.

If you need any more help gettingstarted with PostScript, just give mea call. I must go through this routinea dozen times a day.

How Does EEXEC Work?This certainly is a popular and

ongoing helpline topic. Seems thatbunches of you want to create anduse your own files that use Post-Script’s enigmatic eexec operator.

Actually, eexec is one failed earlyattempt at making textfiles slightlyharder to read at the triple penaltiesof longer textfiles, slower commtimes, and the red flag waving "I’veGot A Secret!" attention-drawing toits own intended use.

We’ve seen in previous columns(and in the Ask The Guru II reprints)how you can "sight read" any eexeclisting simply by installing any oldstack dumping error trapper andthen selectively inserting or elseremoving the characters from theeexec data string. From the returnerror messages, the plaintext file canbe readily rebuilt. All the neededtools are shown in the red, blue,green and black books.

But what is eexec and how does itreally work? Figure two shows yousome key details.

The centermost secret of eexec is a16-bit pseudorandom sequence. Thepseudorandom sequence is a magicstring of numbers. Any few digitstaken together will largely behaveand appear as any "real" randomnumber, yet all of the numbers will

end up geting used and will beequally probable by the time yoursequence repeats. Each repeat of thesequence is exactly the same as theprevious one.

One good method to generate apseudorandom sequence is to use along shift register and then takeseveral carefully selected bits andexclusive-OR them together to formthe next input bit. This generates along chain of apparently randombits that can be grouped togetherinto pseudorandom words. We’velooked at full details on this back inmy Apple Assembly Cookbook and myCMOS Cookbook.

You might also use software togenerate the longer pseudorandomsequences. One way to do this is toselect your current pseudorandomvalue, add one magic constant to it,multiply it with a second magicnumber, and then add yet anothermagic number to it. To make thingsmore interesting, you can replaceyour first magic adder value withyour current data value. This forcesthe generated sequence to be highlydata dependent, and unique foreach and every use.

A second secret to eexec is thelittle known reversibility property ofthe logical Exclusive-OR, or EORoperator. If you EOR two bytes xand y together, you will get a newbyte z, whose individual bits canrepresent the bit-by-bit EOR of thesimilar bits positioned in x and y.

Now for the neat part. If you takethe answer and EOR it back againsteither input byte, you will get thethe other input byte back as a result!For instance, if you EOR z against y,you’ll get x back. EOR z against x,and you should get y back. Try it.

61.5

ASK THE GURU

Fig. 5 – Reading your eexec file of figure three.

/mask 16#D971 def /mult 16#CE6D def /mult1 16#6000 def/mult2 16#6E6D def /adder 16#58BF def /strrx (X) def/skip4 -4 def /trunc16 {16#FFFF and} def

/readeexecfile {{currentfile strrx readhexstring{0 get /echar exch def echarmask -8 bitshift or echar mask -8 bitshift and not and /char exch def skip40 ge {strrx 0 char put strrx print flush 15 {37 sin pop} repeat /skip4 skip4 1add def}{/skip4 skip4 1 add def} ifelse mask echar add dup mult1 multrunc16 exch mult2 mul trunc16 add trunc16 adder add trunc16 /maskexch def}{pop exit} ifelse} loop} def

% //// demo - remove before use. ////

1500 {37 sin pop} repeat

% Here is the expected host-returned result for this demo . . .

% 0 0 moveto 1000 0 rlineto 0 1000 rlineto -1000 0% rlineto closepath fill showpage quit

readeexecfileF983EF00C334F148421509DC30FA053D6DD4273E416E6A2EA64F917B5D20E1119F220AF8FC50D545AB51A0D18B6DD7543D27A21CD55887C1C7D51608F6A316EE8891D92A6E0D09D1D039159DA3A0781E1380B1228C

Thus, your EOR logic operator iscompletely reversible. Your verysame pseudorandom mask value canmove you from plaintext to the en-crypted form, and vice versa.

As figure two can show us, toencrypt an eexec file, you take onebyte at a time from your plaintextinput. That byte gets EORed againstyour upper eight bits of a 16-bitpseudorandom mask value. Thatencrypted byte is then converted toa pair of hex ASCII characters so itcan be sent over a non-transparentdata channel.

Note that your encrypted file isthus twice as long as your originalin this form. It also might takelonger to transmit over your commchannel. Note also that each inputbyte by itself generates another pairof hex ASCII output bytes.

After generating the encryptedhex pair, a new pseudorandommask value gets calculated. This isdone by adding your current en-cryped byte to your current maskvalue, aligned right as usual. Then amagic number gets multiplied tothis result, followed by the additionof a second magic number. The finalresult is the new mask value in thepseudo-random sequence to getused for your next byte.

Note that the encrypted string ishighly data sensitive, because eachsequential data byte plays a role indetermining the next mask value.

The magic multiplier and addernumbers are easily obtained byinputing a long string of doublezeros and then doing an eexec. Your "unshifted" sequence generated bythe return error message then letsyou build up your entire pseudo-random generator. I will leave thisas a student exercise.

The first four characters in aneexec sequence are usually ignored.For many uses, you can simplythrow them away. Presumably,these let you insert a customer oruser key into the eexec process.

Additional eexec insider secretsnow appear in the new black book,otherwise known as the Type I FontFormat from Adobe Systems.

What are This Month’sPostScript Utilities?

I thought we’d have three of themthat will let you further explore thePostScript eexec operator on yourown. Figure three shows you how toencrypt your own eexec file, whilefigure four shows you how to testyour eexec encrypted file. Finally,figure five shows you how you can

undo your eexec file and convert itback into plaintext.

If you’re wondering just why thealgorithm that was used here seemsso convoluted, it is because of aproperty of PostScript that you haveto find a way around. PostScriptnormally allows signed integerswhose max length is only 31 bits.Should you get a 32 bit result, thoseintegers are converted to floatingpoint reals and lose accuracy. Thus,if you desire to do accurate integerarithmetic using PostScript, youhave to be certain you’ll never getmore than a 31 bit result.

Unfortunately, if you multiplytwo 16-bit integers by each other,sometimes you will get a 32 bitresult. To beat this, please note that(x + y)z = xz + yz.

If (x + y) is a 16-bit number, youcan always find an x and a y whosemax length is only 15 bits. Hint: Youmake x and y nearly the same size.

So, to keep your calculations asintegers, you can first multiply x * z,and then truncate to 16 bits with anAND $FFFF. Then you multiply y * z,truncate again to 16-bits and thenadd the two intermediate results.

Hairy, eh what? All this seemingnonsense really does is allow you tomultiply your two 16 bit numberstogether without ever overflowingabove an integer 31 bits.

The short example code I havepicked for these files certainly doesnot need encrypted, but it is veryinteresting in its own light. This iscalled a blackflasher and ejects a solidblack page.

Blackflashing can very much im-prove the quality of your solidblacks and uniform grays whendoing any camera-ready copy oranywhere else you need one or twosheets of first rate output.

It turns out that typical Canondrums do have a slight memory orhistory of the previous images. Byblackflashing once or twice, you"erase" any old ghost images andprecondition the drum to a solidblack. Naturally, this stunt eatstoner for lunch and wastes paper, soyou’ll only want to do it when youreally need first rate quality. ❆

Don Lancaster’s

ASK THE GURUApril, 1990

Adobe’s newest Black BookThe Pelsaer Binding Process

Type I Charstring InterpreterUse of PostScript Action Tables

Finding An Effective Baud Rate

62.1

Fig. 1 – Some new opportunities for "open" Type I fonts.

1. A "shorty font" of only two or three characters can be carried alonginside of a logo or other art cut, eliminating the need for any fancy fontson the end-user’s printer.

2. Seldom-used characters can be deleted off a stock font, releasing vmand making more room in older and smaller PostScript printers.

3. Characters can be intercepted to rapidly handle all of those non-lineartransformations needed for perspective and "star wars" lettering.

4. Letters can now be paired for unusual foreign symbols or for such thingsas a logical compliment notation.

5. Since eexec isn’t really needed, a true 8-bit comm setup can cut font filelengths and comm times in half by eliminating hex-ASCII pairs.

6. Hard-to-enter high ASCII characters can be redefined as low-ASCIIkeystrokes. Especially the emdash and bullet.

7. A new dictionary can be opened after eexec to allow redefinition andalteration any way you like.

8. Actual font paths can get diverted for true outlines, 3-D, chokes,spreads, multi-stroking, and other special effects.

A dobe has released their newblack book, and otherwiseknown as their Type I Font

Format. It is everything they pro-mised and bunches more. Yes, fulldetails on eexec, BlueValues, all thehinting mechanisms, flexproc, andCharstring interpretion. Even theholiest of the most sacred of Adobemantras (1183615869 internaldict be-gin) has been revealed.

You can get the black book for$14.95 directly from Adobe. I also do stock these as a service for all of youComputer Shopper readers.

One surprise: While Type I fontsare extremely well suited for the fastand compact storage of high qualityGreek and Roman alphabets, theyare pretty much useless for logos,alphabets of symbols, or anywhereelse you want to use a rich variety ofPostScript commands.

They definitely cannot be usedfor all the proc cacheing we lookedat a column or two back. The Type Icharacters are pretty much limitedto integer numeric defined curvesand fixed straight lines to be strokedor filled in their entirety, and that’sabout all.

There are all sorts of non-obviousnew opportunities for "open" Type Ifont architecture. I have listed a fewunique possibilities in figure one toget you started.

Apple has at long last extendedtheir warranty to a full year. Thiswelcome move is long overdue.

The new Hewlett-Packard LaserJetIII with its genuine Adobe Post-Script cartridge does appear to berunning away with all of the mar-bles. The III completely blows theLaserWriter NT away for entry levelusers. Tricks are pulled to eliminatemany 300 DPI jaggies and to give theillusion of higher resolution. It stilluses the older 8 PPM Canon SXengine.

No SCSI hard disk and no duplexoption to date, and its cartridge

PostScript remains rather slow. Iwill not be getting one just yet. Andstill no %$*@# carrying handles oroutside toner adjustment.

After running nearly one millionpages through a pile of LaserWriterprinters, I have now pretty muchconcluded that the newer SX engineis simply not rugged enough forcontinuous and sustained use onbusiness cards, book covers, heavyparchments, or index stock mailers.I’ve returned to doing the heavieson my older CX machines.

A reminder that there should be amajor new PostScript board up onGenie whose main goal is to haveone thousand downloads as soon aspossible. Use PSRT or M835.

And I now have a new PostScriptinsider secrets brochure waiting foryou when you call or write.

Onward and upward…

How About Yet AnotherBinding Systems Update?

I’ve been having lots of troublelately with all those Unibind trans-

parent covers cracking up when Iattempt to shear them. Even with aclamped and ultra-sharp blade.

I think it is mostly caused by staleproduct combined with problemsunique to my dry desert Southwest.Preconditioning the covers at a 100percent relative humidity (use a hottub) and padding the covers withscrap pages during shearing seemsto help some. Make sure your dealerwill guarantee you fresh stock.

On the other hand, Unibind doesnow produce an unbelievably greatnew product. This is called a PelsaerBinding. It appears in figure two.

A Pelsaer binding is simply onepreformed hot glue channel that hastwo flyleaf sheets attached to it via aquick release adhesive. You dropyour text inside, and then can wrapyour own custom cover round theoutside. Pop it into your Unibindtoaster, whomp it onto the coolingplate, and then optionally removethe flyleaves.

You could now use nearly anycover material or process, and can

62.2

ASK THE GURU

Fig. 2 – Unibind’s new Pelsaer binding process.

HOT GLUE PREFORM

YOUR CUSTOM COVER

YOUR CUSTOM TEXT

REMOVABLE FLYLEAF

even custom letter the spine.One unique trick is to print your

cover with legal sized cover stock.Allowing for 1/8 inch of trim all theway around on a 1/ 2 inch thickbook, you can handle a text that is aslarge as 6-5/ 8 inch wide by 8-1/4inches high. You can letter the spineand make use of any and all coverenhancements, such as Bakerizing,Kroy Kolor, varnish, u-v overcoat,or lamination.

The cost for the Pelsaer covers isaround fifty cents. This can be yourchoice of (A) less than any otherperfect binding system, or (B) anobscenely overpriced use of lessthan a penny in raw materials.

Contrary to popular belief, a coldglue bookbinding is much betterthan using hot glue. Cold glues wetthe papers better, are stronger andmore flexible, longer lasting, let thebook open flatter, and are even lesstasty to roaches. About the only reallimitations are that cold glue usedto take longer to set up and had alimited pot life.

Those importers at Planax NorthAmerica have come up with an inter-esting variation on cold glue. Whenpressure is applied, water is drivenout of their glue, causing a rapidsetup. It is possible to cycle coldglue perfect binding in under aminute on their machines. Sadly,

their binding machine prices areunreal. You can buy the magic glopfrom them separately, though.

A second source of cold glues andrelated supplies is Gane Bros. Pricesstart around $16 per quart.

What is Meant by The"Click to Clunk" time?

The click to clunk time forms yourultimate measure of the speed of aPostScript printer setup, especiallyfor Book-on-demand printing. Themore you know about exactly whatgoes into your click-to-clunk times,the faster and better your results.

More often than not, several verysimple hardware, software, or evenattitude mods can very much re-duce your PostScript print times.

The click is the carriage return ormouse action from your host thatstarts printing. The clunk is the startof the paper feeding for your pageimage. I routinely have my click-to-clunk page makeup times downin the zero to four seconds rangewhen Book-on-demand printing agonzo three column, multi-figurepages. You can do the same.

What normally happens during aprinting? First, chosen PostScriptcode gets sent over a serial, parallel,SCSI or Appletalk channel. Veryoften, the initial code sent will be aprolog, a dictionary, or some set of

definitions that must be in place be-fore any useful output starts.

Eventually, enough code reachesyour printer such that it can beginplacing actual marks on its bitmappage. At that point, a race starts.The PostScript interpreter tries toempty its print buffer at a speed set by its hardware speed and by yourprogramming style. The commchannel tries to fill the print bufferat a speed set by the comm rate andthe number of characters in theprint file. Obviously, your page can-not be completed until the entire fileis sent and your print buffer is com-pletely emptied.

Now, should your comm bufferbe mostly full, you will be PostScriptintrerpreter limited, and you couldvery significantly speed things upby a pseudocompiling or simply bywriting more efficient code. Shouldyour comm buffer remain mostlyempty, you are Baud Rate limited,and you could speed things up byshortening your input files, andperhaps going to more computationintensive code.

One very gross test to find out ifyou are now baud rate limited is tonotice whether your host recoversbefore the clunk. If you are baudrate limited, your host computerremains tied up until the clunk. Ifyou are PostScript limited, the hostmay (depending on the comm setup)go on back to letting you do otherhost-based tasks.

Note that your PostScript inter-preter is twiddling its thumbs all thetime you are baud rate limited. Andsimilarly, your serial comm channelgets put on hold and does nothinguseful while you are PostScriptinterpreter limited. Either way canwaste time and money. Ideally, youwill normally want to end up justbarely baud rate limited. By only amillisecond or so.

Regardless of how you commun-icate, you can define an effective baudrate. The effective baud rate is themeasure of just how fast the bits gothrough the pipe that includes all ofthe overhead and Hi – How are thewife and kids? handshaking.

Which lets you directly compare

62.3

April, 1990

Fig. 3 – How to find your effective baud rate.

% This test program measures your effective PostScript baud rate and% returns it to the host for display. For most users most of the time,% the effective baud rate is far lower than you think it is.

/numchars 10000 def usertime /strtt exch def

% Empty comment line that’s fifty characters long.% Empty comment line that’s fifty characters long.

(provide precisely 200 comment lines)

% Empty comment line that’s fifty characters long.% Empty comment line that’s fifty characters long.

usertime strtt sub numchars 10000 mul exch div cvi1000 {37 sin pop} repeat

(Effective baud rate: ) print (XXXXXXX) cvs print flush1000 {37 sin pop} repeat (nnn) print flush

parallel, serial, SCSI or AppleTalkrates. Usually your effective baudrate will end up much lower thanyou’d suspect. Very often, the fasterCPU’s will end up giving you muchslower effective baud rates.

Figure three shows you a simplePostScript routine that will measureyour effective baud rate for you.This rate measurement also coulddepend on your file sizes, since SCSIand AppleTalk are sometimes fasteron longer files.

My full page, two figure, threecolumn gonzo files typically rangefrom 8K (uncompiled) to 14K (whenpseudocompiled), so I’ve selected10K as a meaningful file length.

All the program does is send out10,000 characters of comments andthen reports the total time it took todo so back to your host.

You might find the effective baudrate measurement results of figurefour to be somewhat astonishing.As expected, the SCSI drive on theNTX is far and away your fastest,checking in at nearly 400 kilobaud.This would be even faster on longerfiles or combined jobs.

In second place is an old AppleIIe with a hand-crafted honest 57600baud rate routed out the gamepaddle port. The effective and theactual baud rates are identical here,since that character-getting pro-cedure is now included within theinterbit time delays of the custommachine language coding. We haveseen full details on this code inprevious columns and in my AskThe Guru reprints.

The Macintosh II is in third place,and is about one-half the speed ofusing an old Apple IIe. AppleTalkcommunicates much slower thanyou might expect, because of itsextensive handshaking and the"onion effect" of layer upon layer ofcontrolling code.

The Mac SE clocks in at 17400using AppleTalk, or slower than anhonest 19200 baud would be. Again,this is caused by the insane Apple-Talk software overhead.

The PC clones will typically topout around 10000 baud, no matterhow fast you do set your requested

comm rate. You should be able tobeat this through custom bare metalmachine language code. It shouldbe at least theoretically possible tomake a 386 communicate almost asfast as an Apple IIe does.

So what can you do to shortenyour click-to-clunk time after youknow your effective baud rate? Ifyou are baud rate limited, eitherspeed up your effective baud rate orshorten your files. As long as thebaud rate limit remains, you can letPostScript do more work that takeslonger and still end up ahead solong as it shortens your files.

Naturally, all of those usual fileshortening stunts such as using per-sistent downloads and eliminatingthe comments can be used.

If you instead end up PostScriptinterpreter limited, then either cleanup your code or else pseudocompileit. It also may pay to arrange yourfiles so that PostScript has some-thing important and time intensiveto do right away, instead of waitingfor a complete prolog.

There’s lots of ways to increaseyour effective baud rate. On an IBMor clone, try using several commprograms to find the one whoseeffective baud rate is closest to itsnameplate baud rate. Do not eventhink of running slower than 19200baud. CrossTalk doesn’t turn out allthat bad, but even it could definitelybe improved. Or write your owncustom 57600 baud driver.

Simply trading your klunky oldMac II up to a sleek new Apple IIewill double your effective baud rateand could cut your PostScript printtimes in half.

But more to the point, replacingAppleTalk on a Mac SE with somedirect SCSI comm scheme couldraise all your effective baud rates,perhaps by as much as 30:1. Appledefinitely does not want you to dothis, since it makes AppleTalk lookso abysmally putrid.

One way to handle fast comm isto host create what appears like afake hard disk on the SCSI port onyour NTX. Even writing each file todisk and then reading it back im-mediately after would often be 15times faster than AppleTalk.

If you are any kind of a SCSI guru,let us talk some more on this. Appleappears to be purposely slowingtheir PostScript laser printers downby as much as 30:1 at present.

What is the Distillery?As we have seen in the past, it is a

fairly simple matter to do a pseudo-compile on your PostScript code tospeed it up for a later reuse. Whatpseudocompiling does is interceptall those PostScript operators, andthen returns a file of only essentialfinal results either to the hard disk orback to your host for recording.

The result is a somewhat longerfile that most often should run sig-nificantly faster. In fact, for typical

62.4

ASK THE GURU

Fig. 4 – A few effective baud rate results.

SCSI Hard Disk

HD-20 file read to the LaserWriter NTXEffective Baud Rate: 398700 Effective Character Rate: 39870

APPLE IIe

AppleWriter with custom driver out the game paddle port.Effective Baud Rate: 57600 Effective Character Rate: 5760

MACINTOSH II

Adobe Font Downloader via AppleTalk to NTX.Effective Baud Rate: 32038 Effective Character Rate: 3204

MACINTOSH SE

Adobe Font Downloader via AppleTalk to NTX.Effective Baud Rate: 17496 Effective Character Rate: 1747

APPLE IIgs

AppleWriter via Super Serial Card at 19200 baud.Effective Baud Rate: 15827 Effective Character Rate: 1583

IBM PS2 Model 50

Crosstalk at 19200 baud.Effective Baud Rate: 10760 Effective Character Rate: 1076

Book-on-demand pages, the finalpseudocompiled files will oftenprint at your full printer pagefeeding speed, including all the pagemakeup on a page after page basis.

But, before we go on, do note onething: Pseudocompiling won’t work atall if you are baud rate limited! In fact, it can make things even worse, sinceyou may now have longer files. It isextremely important to optimizeyour effective baud rate before youdo a pseudocompile.

At any rate, Adobe Systems hasintroduced a great new packagecalled the Distillery and available fora nominal charge as part of theirAdobe Developer’s Disk or off ourgreat GEnie PSRT bulletin board.This code is an amazingly versatilepackage which attempts to handlejust about any asled fpr PostScriptprogramming style. And more oftenthan not, it returns a file that runsmuch faster and is only somewhatlonger.

Besides all the obvious uses ofshowing problem areas in your pro-gramming and speeding up yourrun times, the Distillery gets quite

handy any time you want to releasea new demo disk without providingyour source code. Simply run yourcode through the Distillery, and allof your fast run demos should notreveal in any way the code thatoriginally created them.

There are some problems with theDistillery, but it does do all its workamazingly well. One limit is that apath is redefined every time it isused. I often like to triple stroke aline or a border, first to break thebackground, second to create theblack outline, and finally the whiteor a grey fill. The Distillery willredefine the same path three timesin a row, rather than using a gsave-grestore construct.

Also, the returned "print-a-string"files do have more characters inthem than is really necessary, whichcauses problems if you’re anywherenear an effective baud rate limit.The Distillery clipping procs simplydo not work properly at the presenttime. And there are some other bugsin the present release.

Note that a manual interventionafter using your Distillery can mini-

mize many of these problems.How does the Distillery compare

against my Gonzo Compile that welooked at in previous columns? TheDistillery is far more flexible, moreadaptable, and considerably morepowerful. But the Gonzo Compilegenerates shorter and more efficientawidthshow files that rerun muchfaster. Especially since it sorts outall of those string messages suchthat no font ever need be changedmore than once per page.

Since both programs are openand unlocked, the chances are youmight want to take the best of bothworlds and combine them into onecustom solution.

What is This Month’sPostScript Utility?

Let’s look at an ultrafast andpowerful old PostScript program-ming technique, that also can getyou started on interpreting theCharstrings in your Type I fonts.

Most any computer languageneeds a way to jump six ways fromSunday at some point in a program. In machine language, we might call this an option picker. Detailed ex-amples of option picking appear inmy Apple Assembly Cookbook. InPascal, there is a case commandwhere, depending on a number, achosen subroutine gets run.

In any language, you might useifelse statements. But nestle thesemore than six deep and they end upcertain to be wrong. Hoffschnagle’srule and all. You also can end upwith monster spagetti code, variableexecution time, and hard changes.

Instead, PostScript offers you adifferent and an elegant approach tojumping six ways from Sunday thatI prefer to call an action table. Actiontables are very fast and flexible.

An action table is nothing but anarray of procs. You can create youraction table array just once at thebeginning of your code and thenlater select any proc for execution.

We might start out with a simpleexample. Let’s first define a threeentry action table…

/tbl [{proc0}{proc1}{proc2}] def

62.5

April, 1990

Fig. 5 – Type I Charstring interpreter using action tables.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street, Box 809,% Thatcher AZ 85552. (602) 428-4073. All rights reserved. Personal use is permitted so% long as this header remains intact. Show and Tell disks for Apple, Mac, or IBM cost $39.50.

% Replaces a decrypted and clipped PostScript binary charstring on stack top by an array% of plaintext commands also on top of stack. Limited to 500 commands per string.

% build charstring action table256 array /cstringtable exch def 0 1 255 {cstringtable exch {notdefx} put} for 32 1 246 {cstringtableexch dup 139 sub put } for cstringtable dup 01 {/hstem} put dup 03 {/vstem} put dup 04 {/vmoveto}put dup 05 {/rlineto} put dup 06 {/hlineto} put dup 07 {/vlineto} put dup 08 {/rrcurveto} put dup 09{/closepath} put dup 10 {/callsubr} put dup 11 {/return} put dup 12 {doescape} put dup 13 {/hsbw} putdup 14 {/endchar} put dup 21 {/rmoveto} put dup 22 {/hmoveto} put dup 30 {/vhcurveto} put dup 31{/hvcurveto} put dup 247 {0 longnum+} put dup 248 {1 longnum+} put dup 249 {2 longnum+} put dup250 {3 longnum+} put dup 251 {0 longnum-} put dup 252 {1 longnum-} put dup 253 {2 longnum-} putdup 254 {3 longnum-} put dup 255 {getlonginteger} put pop

% build an escape action table34 array /csesctable exch def 0 1 33 {csesctable exch {notdefesc} put} for csesctable dup 0{/dotsection} put dup 1 {/vstem3} put dup 2 {/hstem3} put dup 6 {/seac} put dup 7 {/sbw} put dup 12{/div} put dup 16 {/callothersubr} put dup 17 {/pop} put dup 33 {/setcurrentpoint} put pop

% These are the actual routines that use the action tables…/nextcspoint {cspoint csstring length 1 sub lt {/cspoint cspoint 1 add def}{exit}ifelse} def

/charstringtocommands {/csstring exch def /cspoint 0 def mark {cstringtable csstring cspoint get getcvx exec cvx nextcspoint} loop] } def

/longnum+ {256 mul nextcspoint csstring cspoint get add 108 add} def

/longnum- {256 mul nextcspoint csstring cspoint get add neg 108 sub} def

/getlonginteger {nextcspoint csstring cspoint get 0 ne nextcspoint csstring cspoint get 8 bitshiftnextcspoint csstring cspoint get add 8 bitshift nextcspoint csstring cspoint get add exch {dup16#FFFFFF or exch 16#FFFFFF and not and 1 add neg} if } def

/doescape {/escape cvx nextcspoint csstring cspoint get csesctable exch get exec cvx} def

% //// demo - remove before use

1000 {37 sin pop} repeat % optional host delay

% Adobe’s black book page 59 "C" example - faked into binary string/fakestring [189 249 180 13 139 239 3 139 239 1 248 236 239 1 139 22 249 80 6 239 7 252 236 6248 136 7 248 236 6 239 7 253 80 6 9 14] def fakestring length string /tempstring exch def 0 1fakestring length 1 sub {/ptr exch def fakestring ptr get tempstring exch ptr exch put} for

tempstring charstringtocommands % this does it

/magicstringarray exch def magicstringarray {cvlit (XXXXXXXXXXXXXX) cvs ( ) print flush 40 {37 sinpop} repeat print flush} forall

magicstringarray 1000 {37 sin pop} repeat ( n n n) print flush quit

Elsewhere, you will define proc0 astask #0, proc1 as task #1, and proc2 astask #2. Later on in your program,say you have a verified number onyour stack from 0 to 2. Just do a

tbl exch get exec

and your newly selected procedurewill cleanly, quickly, and automat-ically be activated and run.

There is no limit to the size of anaction table, and one table can callitself or another of a different size.And your program structure doesnot change as you change entries.

One useful action table size is 256entries. For instance, in my gonzojustify routines, an action table letsyou substitute or redefine any of theASCII characters, while you isolatesuch things as formfeeds, escapecommands, carriage returns, new-line commands, and the reverseslashes for any special treatment.Think about this for a bit, and you’llrealize this gives you a universalemulator that can do darn nearanything. With zero decisions ornesting being involved.

Let’s look at a fancier example ofa 256 entry action table that some-times might call a second smallaction table. Once you do get wellinto the Adobe black book on Type Ifonts, you’ll be needing a means tointerpret a binary Charstring backinto its open-format commands.Figure five shows you an actiontable based program for this.

After decryption and removal offour leading characters, a Charstringconsists of a binary coded string,each "character" of which assumesone of 256 values. Those first fewvalues represent Type I procs suchas hstem, vlineto, or callsubr. Thedecimal 12 value is an escape that letsyou go to the second table for thelesser used commands such as dot-section or seac.

Characters 32 through 246 shouldrepresent the integers from -107 upto +107 on a substitution basis. Notethat this gives you as much as 5:1compaction since a single binary 32can represent those five charactersneeded for the ASCII -107 (don’tforget the space!). Because of this

compaction, Type I fonts often endup much shorter than most others.

The characters 247 through 254should represent values from -108to -1131 or 108 to 1131. These use thenext byte in the Charstring to com-plete the value. Thus, the lesser-used numbers are less compacted.

Finally, character 255 goes aheadand gets a full 32 bit binary signedinteger using the next four stringcharacters. This one is rare.

The action table can dramaticallyspeed up and simplify the code. Yousimply grab one binary character ata time out of your Charstring. If it isa proc, you post it. If it is an escapedproc, you find the proc and thenpost it. If it is a small number, youwill substitute it. If a larger number,

you calculate it. I have shown theresult as an array that can be madeexecutable or else printed to a harddisk or back to your host.

Since it is tricky to send a binarystring over a typical comm channel,I have built up this example stringusing that "C" code example in theblack book. Then we have bothsaved it to disk and reported it backto your host. You also have theoption of switching between binaryand hex ASCII pairs; I’ve left thisextra hassle off for now.

I will have much more on Type Ifonts in future columns. For now, Ijust wanted to show you just howan action table works and give yousome bare bones code to get youstarted. Do read the black book. ❆

Don Lancaster’s

ASK THE GURUMay, 1990

PostScript font path grabberRubber stamp opportunities

Perspective lettering routinesA hacker interchange standard

Non-linear transformation ideas

63.1

Fig. 1 – A typical hacker printed circuit download.

Y our no-charge Ask the Guruhelpline now fields between40 and 120 calls per day. Of

these, around 60 percent are Macpeople, and 35 percent are whateverthose IBM users are calling them-selves these days. The remaining 5percent of the calls are often in the"Boy, a whole flock of them flewover that time!" category.

Which is why Ask the Guru is inthe Mac section. Another reason isthat Apple’s LaserWriter is wronglyperceived to be a Mac peripheral.As we have recently seen, all of thePostScript-speaking LaserWritersare totally device independent, andwork beautifully with Apple, Atari,VAX, Commodore, clone, or IBMhosts. Yes, it is even theoretically

possible to use a LaserWriter with aMac, although you often may findcheaper and faster printing hostselsewhere.

Apple has released their thirdCD-ROM title, called A Disk NamedWanda. Among other goodies arecomplete Mac operating systems forjust about every major Europeanlanguage. The 400 Megabyte storagecapacity of this single disk is some-where around five to ten percent ofthat of the human brain. A scary fig-ure if ever there was one.

Needless to say, CD ROM is goinglike gangbusters. Hundreds of titlesare now available. Expect virtuallyall future Apple software and techinformation to use this CD formatnearly exclusively. As a reminder,

Apple does have a special one-onlyprice on their drives if you are adeveloper, dealer, or a user group.Apple also will line you up withmastering services for all your owncustom CD ROM platters at $1500for fifty copies. Including cases andcover art.

Separately, Apple has a new andhandy Developer Handbook out thatlists nearly all of their major people,programs and services. Includingall names and addresses.

I recently presented one of myPostScript opportunity seminars forthe people at QMS and their LaserConnection marketing arm. Outsideof being a tad too far to commute inone day, I was very impressed withthese folks and their offerings.

They do seem strongly end-useroriented and now have outstandingcustomer relations and PostScripthelp departments. Their offeringscover the gamut from PostScriptprinters roughly comparable to theLaserWriter NT and NTX on up toreally durable and sophisticatedhigh-end industry stuff, both inblack and white and in incrediblygood (but costly) full color. Andthey have even better goodies aboutto emerge from their skunk works.And all speaking genuine AdobePostScript, of course.

QMS does have a thick and freenew Infobook for you that details allof the low end products, especiallythe PS-810 through the PS-820 turboPostScript printers. I soon hope torun several long-term performancecomparisons of their turbo PS-820against the NTX. My prediction isthat the 820 should blow the NTXaway, especially when it comes to afast SCSI host comm. Stay tuned.

As we have seen in past columns,there is a new Recharger toner car-tridge refilling newsletter. There’salso a new trade group known asthe International Computer ProductsRemanufacturing Association, or the

63.2

May, 1990

Fig. 2 – How to make a Merigraph rubber stamp.

An ultraviolet "flash" exposure ismade through the base sheetand the photopolymer, hardeningaround one-half of the total 1/8inch thickness.

A second uv exposure is madethrough a 1:1 negative toselectively harden the "mesas"of the stamp image and mergethem into the previouslyhardened base layer.

The remaining liquid portions arewashed away with soap and hotwater. A final heavy underwateruv exposure further hardens thestamp, which is then dusted, cutto size and mounted on asuitable handle.

ICPRA for short. Publishing leadtimes being what they are, you justmissed their first major Chicagoconference on drum recoating.

I have a Lazer Products recoatedSX drum here that is now on itsfifteenth reload. The remanufacturedand recoated drums now seem tohave arrived with a vengeance.

It certainly was very thoughtfuland considerate of Canon to singlehandedly create this great multi-megabuck industry which now em-ploys thousands of independentsnationwide. And, thanks to them,the 0.3 cents per page toner costs arenow a reality. Again, without Canonand all their pricing and reloadingpolicies, it never would have hap-pened at all.

Thanks loads, guys.Needless to say, I am profoundly

and deeply disturbed over the im-pending demise of the Apple IIeand the IIgs. Which is sort of likewatching an old and dear friend dieof AIDS. Or perhaps it was the farmore insidious and infinitely moreinfectious APW that did it. The onethought that keeps going throughmy head – How could they havebeen so monumentally stupid?

At any rate, fire sales are beingheld around the country to flushremaining IIe and IIgs inventories.Some of these are great bargains.

For instance, A2 Central is nowflushing the entire Addison-WesleyIIgs library at less than 1/3 the usualprice. An outright steal. The TechAlliance folks (who used to be CallA.P.P.L.E.) are also having a majorclearance of both their Apple andMac software and books. Again atgreatly reduced prices.

And some back issues and soft-ware stock still remains at AppleAssembly Line, especially several ofthe best low cost cross-assemblymodules available anywhere.

I guess I put an awful lot of timeand effort into the IIe and IIgs. TheIIe was (and definitely remains) mykind of computer. And I really felt Itried to share most of it with you.But, I’d also guess someday in thedark, distant future I will have toactually start seriously using a Mac.

Maybe I’ll begin doing so just assoon as somebody offers somethingalmost as good as AppleWriter. To-day, of course, nothing comes evenremotely close.

In keeping with these sad times,I decided to offer a "four-for-three"deal with my Enhance I, Enhance II,Apple Assembly Cookbook and Apple-Writer Cookbook classics.

As another reminder, I am alsonow stocking Adobe’s black Type IFont Format book and have recentlyexpanded my LaserWriter Secretsbook and disk combo.

On to a currently hot topic…

How Can I Solve ThoseHacker Interchange Hassles?The editors at Computer Shopper,

Popular Electronics, Probe, MidnightEngineering, Nuts and Volts, AudioAmateur, Byte, Radio-Electronics, andCircuit Cellar Ink have all been sep-arately grappling with a commonproblem: How can accurate printedcircuit layouts get cheaply and eas-ily put in the end user’s hands?

Or dialplates, drilling templates,detailed test and debug info, soft-ware listings, or most any other techwriting or tech illustrations?

Putting any of these in the maga-zine takes up valuable space, andthe third-generation photocopies orlitho negatives you sometimes endup with are often of low accuracyand quality. And it sure gets hard tomake any correction three monthsafter the fact on 360,000 alreadyprinted pages, some of which areburied in Mule Hoof, Montana.

On the other hand, the BBS down-loading will only work if the senderand sendee both have fully compat-ible hardware and software.

I’d like to suggest an obvioussolution. It is called an EPS file, andis short for Encapsulated PostScript.

An EPS file can easily handle anyprinted circuit layout, a schematic,isometric or a perspective drawing,any dialplate, or text or graphics toarbitrarily high resolution.

The EPS files are extremely deviceindependent. Since an EPS file is an

63.3

ASK THE GURU

Fig. 3 – A PostScript font path grabber.

% Pathgrab code (Version 47 or earlier, 68XXX Only)% written by LDO, 1990. This line must remain on any reuse.

userdict begin /e {cexec}def /$cexec {<11a2b000 40> eexec} def

<6EA0339904E8000104020010000000002F172F6F000800044EFA041400000000205F43FA FFF8229F4ED0207AFFF0D0FC00A020504E902040226F000422D822D84E7520572EAF0004 2F6F000800042F480008207AFFC8D0FC005020504E90508F4E75207AFFB8D0FC00802050 4ED020572EAF00042F480004207AFFA2D0FC00F820504E90588F4E7520572EAF00042F6F 000800042F480008207AFF82D0FC011C20504E90508F4E7520572EAF00042F480004207A FF68D0FC00B420504E90588F2040226F000422D822D84E75207AFF4ED0FC009C20504E90 2040226F000422D822D84E7520572EAF00042F6F000800042F6F000C00082F6F0010000C 2F480010207AFF1AD0FC007420504E90DEFC00102040226F000422D822D84E752F6F0004 000C201F225F205F2F0070001018600212D851C8FFFC42194E75221F201F225F205F2F01 600212D851C8FFFC484051C800046004484060EE4E754E56FFFC48E7010849FA03582854 2E140687000000432D47FFFC286EFFFC42144CDF10804E5E4E754E56FEE848E70108486E FEE8598F487A008C286E0008486CFF004EBAFF7E4EBAFF06588F2D6EFEE8FFF82D6EFEEC FFFC486EFEE82F2EFFFC2F2EFFF8286E00082F2CFEFC2F2CFEF84EBAFF18588F2D6EFEE8 FFF02D6EFEECFFF43E2EFFF21D47FEF02F2EFFF4486EFEF142471E2EFEF048C72F074EBA FF42486EFEF0487A00184EBA02BC57C744071D47000C4CDF10804E5E2E9F4E750432332E 30000776657273696F6E4E56FFFA48E70118286E0008286C00082E1406870000011C2847 2D54FFFC3D7C0180FFFA55AEFFFC286EFFFC0C944EF10E006600001859AEFFFC286E0008 197C0001FEF060000044600000222E2EFFFC598728470C94E780D0B966000010286E0008 197C0001FEF060000020536EFFFA4A6EFFFA6600000E286E0008422CFEF0600000081E3C 0000679A286E00084A2CFEF067000010286E0008266EFFFC26532953FEF44CDF18804E5E 2E9F4E754E56FFDE48E70118486EFFDE598F487A00DE286E0008486CFF004EBAFE2C4EBA FDB4588F2D6EFFDEFFF82D6EFFE2FFFC486EFFDE2F2EFFFC2F2EFFF8286E00082F2CFEFC 2F2CFEF84EBAFDC6588F2D6EFFDEFFF02D6EFFE2FFF43E2EFFF2CFECFEF248C7DEACFEF4 28472D54FFEC3D7C007FFFE6286EFFEC0C542079660000262E2EFFEC5C8728470C944A28 00436600001454AEFFEC286E0008197C0001FEF06000002454AEFFEC536EFFE64A6EFFE6 6600000E286E0008422CFEF0600000081E3C000067AE286E00084A2CFEF06700001449FA 01142D4CFFE8286EFFE8266EFFEC28934CDF18804E5E2E9F4E750A70617468666F72616C 6C004E56FFF048E70108486EFFF04EBAFC4E588F2D6EFFF0FFF82D6EFFF4FFFC2F2EFFFC 2F2EFFF84EBAFC4C487AFD60598F487A0020286E0008486CFF004EBAFD104EBAFC784EBA FC4E4CDF10804E5E2E9F4E750D756E70726F74656374706174684E56FEE848E70108286E 00082F144EBAFBE21D7C0001FEF0486EFEE84EBAFC80588F2D6EFEE8FEF82D6EFEECFEFC 558F2F0E4EBAFD201E1F670000143D7C0004FEF22D7C00497CCCFEF46000000E3D7C0008 FEF22F0E4EBAFDA04A2EFEF0670000082F0E4EBAFE404A2EFEF0670000082F0E4EBAFF2C 1E2EFEF0488748C72F074EBAFBBE4CDF10804E5E2E9F4E7500000000241F225F205F2F02 42401018424112193400B44163023401B4026002B10956CAFFFC6602B0414E75>

$cexec

not {(Couldn’t define unprotectpath r) = quit} if end

/dumpchar {false charpath /TempStr 255 string def unprotectpath {exch TempStr cvs print( ) print TempStr cvs print ( moveto) =} {exch TempStr cvs print ( ) print TempStr cvs print (lineto) =}{6 5 roll TempStr cvs print ( ) print 5 4 roll TempStr cvs print ( ) print 4 3 rollTempStr cvs print ( ) print 3 2 roll TempStr cvs print ( ) print exch TempStr cvs print ( )print TempStr cvs print ( curveto) =}{(closepath) =} pathforall} def

% //// demo - remove or alter before reuse ////

userdict begin newpath 0 0 moveto /Times-Roman findfont 72 scalefont setfont(T) dumpchar quit

ordinary ASCII textfile, it can easilybe used with any word processor orany editor using any personal com-puter of any age and CPU.

At the output end, an EPS file canbe used directly on a laser printer, atypesetter, or with a photoplotter.With simple and crude emulators asFreedom of the Press, GoScript, andUltraScript, you could also printyour results on ordinary dot matrixor ink jet printers, albeit to a muchlower resolution.

Better yet, practically all of thoseCAD/CAM and illustration pack-ages either now use PostScript in-ternally or at least are capable ofgenerating EPS output files.

Figure one shows you a typicalhigh quality printed circuit layoutthat is ideal for instant distributionvia an EPS textfile to any editor orany word processor on any personalcomputer anywhere in the world.

Your EPS files can also be verycompact. For instance, a fancy cir-cuit schematic should need no morethan a 10K textfile maximum. So,EPS stores cheap and loads fast.

But what if you are using an ex-pensive or proprietary CAD/CAMlayout package? Surely you couldnot provide a free copy of these toevery reader in the country, couldyou? Especially if you are on a Macand they are on a PC.

There is a simple little pseudo-compiling trick you can pull. Withpseudo-compiling, you can convertany source of PostScript code into aJust the facts, Ma’am form that usesnothing except the simplest of pickand position PostScript commands.Anyone can run a pseudo-compiledEPS file, and absolutely zilch willremain of the original code or theway it was generated.

Better yet, that pseudo-compiledPostScript often will print ridicu-lously faster than the original. Andpseudo-compiling can be easily andquickly done by using Adobe’s newand cheap Distillery program, or byone of my gonzo routines.

The Distillery is now available asDISTILL.PS #186 on GEnie PSRT.

We have seen a few examples ofpseudo-compiling in the past issuesand in the Ask the Guru reprints.

What about screen images? In anybroad based user interchange stand-ard, you certainly wouldn’t want touse any screen images if they hurtdevice independence in any way.

Fortunately, new systems usingdisplay PostScript or those displayPostScript emulators are now be-coming readily available, as is thesoftware which returns printer bit-maps for a screen display. So areprograms and applications that in-ternally capture and display EPS.

How does an EPS file differ fromsome ordinary PostScript textfilecode? Actually by very little. Thereare a few required remarks at thestart of your file plus a few optionalones. And a few obscure PostScriptcommands (such as initgraphics) arenot allowed if they could somehowcorrupt the program or system thatthe EPS file is being imported into.Several other unpopular commands(such as settransfer) must be care-fully saved and restored if they arealtered. EPS files are limited to asingle page each, but you can useas many of them as you like.

To get started on all of this, getyourself copies of the EncapsulatedPostScript Files Specification, v 2.0,and that Document Structuring Con-ventions Specification, v 2.1. Both ofthese are available free on request

63.4

May, 1990

Fig. 4 – A PostScript nonlinear text string remapper.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street, Box 809,% Thatcher AZ 85552. (602) 428-4073. All rights reserved. Personal use is permitted so% long as this header remains intact. Show and Tell disks for Apple, Mac, or IBM are $39.50.

% This routine is similar to the PostScript -ashow- operator, except that you can non-linearly% remap your text message onto any surface. For perspective, star wars, spheres, etc...

% Here are some typical path results from figure three...

/T {611 {14 729 mt 14 604 li 235 604 li 235 0 li 385 0 li 385 604 li 598 604 li 598 729 li cp}} def

/N {722 {68 729 mt 68 0 li 218 0 li 218 508 li 513 0 li 661 0 li 661 729 li 511 729 li 511 228 li 216729 li cp}} def

/O {778 {742 359 mt 742 469 702 579 634 650 ct 573 713 484 741 391 741 ct 298741 209 713 148 650 ct 80 579 40 469 40 359 ct 40 249 80 139 148 68 ct 209 5 298 -23 391 -23ct 484 -23 573 5 634 68 ct 702 139 742 249 742 359 ct cp 391 108 mt 343 108 295 122 257 157ct 209 201 185 280 184 359 ct 185 438 209 517 257 561 ct 295 596 343 610 391 610 ct 439 610487 596 525 561 ct 573 517 597 438 598 359 ct 597 280 573 201 525 157 ct 487 122 439 108391 108 ct cp}} def

/F {611 {74 729 mt 74 0 li 224 0 li 224 313 li 543 313 li 543 438 li 224 438 li 224 604 li 586 604 li586 729 li cp}} def

/E {667 {79 729 mt 79 0 li 624 0 li 624 125 li 229 125 li 229 313 li 578 313 li 578 438 li 229 438 li229 604 li 607 604 li 607 729 li cp}} def

/R {722 {80 0 mt 230 0 li 230 288 li 406 288 li 458 288 494 264 496 215 ct 494 162 494 104 49668 ct 498 44 504 22 516 0 ct 677 0 li 677 27 li 661 37 649 46 649 87 ct 648 124 646 220 642 250ct 634 316 586 334 561 351 ct 610 380 642 403 660 466 ct 678 529 663 581 653 613 ct 632 692558 726 485 729 ct 80 729 li cp 230 604 mt 433 604 li 500 604 524 574 524 522 ct 533 450 470413 435 413 ct 230 413 li cp}} def

/space {250 {}} def

% Your non-linear transform goes here. It accepts x and y on the stack and later returns% x’ and y’ to the stack, following your remapping rule or rules...

/nlt {} def % substitute your own nonlinear operator (see fig 5 for example)

% Service routines...

/mt {exch fontsize 0 get mul .001 mul xoffset add nlt exch fontsize 3 get mul .001 mul yoffset addmoveto} def % nonlinear moveto

/li {exch fontsize 0 get mul .001 mul xoffset add nlt exch fontsize 3 get mul .001 mul yoffset addlineto} def % nonlinear lineto

/ct {3 {6 2 roll exch fontsize 0 get mul .001 mul xoffset add nlt exch fontsize 3 get mul .001 mulyoffset add} repeat curveto} def % nonlinear curveto

/cp {closepath} def /strrx ( ) def

/nlashow {/msg exch def msg {strrx exch 0 exch put strrx dup ( ) eq {pop (space)} if cvn load/curchar exch def curchar 0 get /cwide exch def curchar 1 get /nlashow {/msg exch def msg {strrxexch 0 exch put strrx dup ( ) eq {pop (space) } if cvx exec exec charproc fontsize 0 get mul 1000div extrakern add xoffset add /xoffset exch def} forall} def

/charproc {stroke} def % does what you want to your path

% //// demo - remove before use. ////

/fontsize [72 0 0 72 0 0] def /xoffset 100 def /yoffset 200 def /extrakern 3 def

(FREE FONT) nlashow showpage quit

through Cynthia Johnson at AdobeSystems. You should not create oruse any EPS files without havingfurther EPS details on hand.

The fundamentals on PostScriptare covered in Adobe’s blue Post-Script Tutorial and the red PostScriptReference Manual II. The latter nowincludes full EPS details.

Lots of printed circuit layout,schematic, isometric, and perspec-tive drawing routines can be foundin my PostScript Show and Tell. Letme know your thoughts on astandardized hacker interchangeformat based upon EPS files.

What is PostScriptSuper Fax?

I am not at all impressed withtoday’s fax machines. In fact, I thinkthey are an outright con. You havegrossly overpriced machines whichproduce an abysmally putrid printquality on ludicrous papers.

Yet, none of this need be. A slewof new PostScript superfax printersand software are about to hit themarket that completely blow thesetraditional stand-alone machinesout of the water.

Among other obvious benefits,PostScript superfax offers far lowercosts, a much higher print quality,and shorter comm times.

It only costs around $40 or so inparts to add a full superfax capa-bility to a PostScript laser printer. Astand-alone machine is not neededfor many applications.

Here’s how superfax works: APostScript superfax machine makesthe phone call and then issues aninquiry string to determine whetheran ordinary fax or a superfax is atthe other end. If an ordinary faxmachine, a 216 DPI bitmap is crea-ted and compressed, then sent andreceived. Even using a dumb faxmachine at the far end, you’ll get amuch higher final print quality, asno scanner is involved.

Instead, if there is a PostScriptsuperfax at the far end, then theimage gets sent as a PostScript pro-gram instead. When saved to disk atthe far end, PostScript’s device in-dependence can give you instant

National Geographic quality. Yes, youcan easily fax camera-ready art! In ad-dition, the far end machine printsyou a hard copy to the best of itsresoloution abilities. Even at plainvanilla 300 DPI, this is vastly betterthan traditional fax. Especially sinceyou can print onto your choice ofgood papers.

What about transmission times?Sometimes the PostScript superfaxcould be slower, but generally it canbe much faster. For instance, an

ordinary fax business letter mightconsist of four million dots.

Let us assume a 10:1 compression,leaving us with 400 K dots, or 50Kbytes. The same letter done in Post-Script can be coded in less than 5Kbytes, perhaps less if the letterheador signature or background formare in dictionaries. Thus, much ofyour ongoing typical businesscorrespondence could be up to tentimes faster when using PostScriptsuperfax.

63.5

ASK THE GURU

Fig. 5 – Perspective letter using nonlinear transformations.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street, Box 809,% Thatcher AZ 85552. (602) 428-4073. All rights reserved. Personal use is permitted so% long as this header remains intact. Show and Tell disks for Apple, Mac, or IBM are $39.50.

/R { 722 { 124 115 mt 123 43 119 35 39 37 ct 39 -5 li 105 -2 156 0 195 0 ct 234 0 284 -2 350 -5 ct350 38 li 269 35 265 43 265 115 ct 265 601 li 265 608 267 616 269 624 ct 288 627 309 629 329 629ct 407 629 464 587 464 505 ct 464 411 396 354 304 362 ct 297 344 li 521 -5 li 551 -2 581 0 611 0 ct643 0 676 -2 708 -5 ct 708 37 li 683 40 653 61 638 82 ct 457 356 li 540 386 606 445 606 539 ct 606580 601 602 572 632 ct 520 686 440 683 370 683 ct 299 680 247 678 205 678 ct 163 678 110 68039 683 ct 39 641 li 119 643 123 635 124 563 ct closepath}} def

/mt {exch fontsize 0 get mul .001 mul xoffset add exch fontsize 3 get mul .001 mul yoffset add nltmoveto} def

/li {exch fontsize 0 get mul .001 mul xoffset add exch fontsize 3 get mul .001 mul yoffset add nltlineto} def

/ct {3 {6 2 roll exch fontsize 0 get mul .001 mul xoffset add exch fontsize 3 get mul .001 mul yoffsetadd nlt} repeat curveto} def /cp {closepath} def /strrx ( ) def

/charproc {gsave 1 setgray fill grestore 0.5 300 mul 72 div floor 72 mul 300 div setlinewidth stroke}def

/nlashow { /msg exch def msg {strrx exch 0 exch put strrx dup ( ) eq {pop (space) } if cvn load execexec charproc fontsize 0 get mul 1000 div extrakern add xoffset add /xoffset exch def} forall} def

/prd1 {/zi exch def /yi exch def /xi exch def objrot cos xi mul objrot sin yi mul sub objrot sin xi mulobjrot cos yi mul add zi /zz exch def /yy exch def /xx exch def yo dup yy add div dup xx xo sub mulexch zz zo sub mul} def /nlt {currenty exch prd1} def

% //// demo - remove before use. ////

/fontsize [200 0 0 200 0 0] def /extrakern 10 def /xo -300 def /yo 700 def /zo 500 def/objrot 15 def 0 800 translate

60 -3 0 {/currenty exch def /xoffset 0 def /yoffset 0 def (R) nlashow} for showpage quit

I’ve said about all I am allowed toon this for now. But expect somePostScript based major changes inwhat fax is and what it can do.

How About a RubberStamp Update?

The Grantham Polly-Stamp folksrecently sent me one of their newrubber stamp kits. My students andthe hired help sure have been get-ting off on it.

The first secret to custom rubberstamps, naturally, lies in PostScript.With PostScript, you can freely mixand match any combination of text,

graphics, and line art you want forvirtually any custom stamp of anysize. You can also work 1:1 and doreverses, so there’s no need for adarkroom or a stat camera.

The second secret to all of yourcustom rubber stamps is the magicliquid photopolymer. Merigraph isone brand name. While intended forflexographic carton printing, Meri-graph performs just fine for rubberstamps of virtually any size.

You can get this stuff retail fromGrantham Polly-Stamp or IMEC, inlarger quantities from R.A. Stewart,or in railroad tank car lots directly

from Hercules Merigraph.Even retail, you are only looking

at fifteen cents per square inch ofstamp. Say a quarter after you allowfor near misses and unused spacebetween individual stamps.

Figure two shows you how theMerigraph process works. Usually,you do enough stamps side by eachto make up a 4-1/2 by 9 sheet.

Merigraph is a chemical liquidphotopolymer that hardens in thepresence of ultraviolet light. Youfirst "flash" expose an 1/8 inch lay-er of the liquid glop through anunderlying backing sheet. This willharden the entire bottom of yourphotopolymer, to a depth of aboutone-half the liquid thickness.

A second flash exposure is thenmade from the other side, through anegative, through a 1:1 PostScripttransparency, or else a Kroy Colorreversal. Those portions of yournegative that transmit light willselectively harden areas within theMerigraph liquid, forming thehardened "mesas" where the lettersand line art are to appear.

The second exposure is onceagain set to harden to a depth ofabout one-half the liquid thickness.Your solid mesas now merge withthe solid backing, forming yourtypical rubber stamp shape.

You next peel off the negative orwhatever and then wash away anyremaining liquid photopolymer byusing soap and hot water. The resultat this point is a "raw" rubber stamp.You then expose yet a third time tothoroughly harden all of the re-maining photopolymer. This getsdone under water.

Lastly, you cut the stamps to size,dust them with powder, and mountthem on individual stamp handles.The final polymer is around 50 dur-ometer, and comparable to a goodgrade of stamp rubber.

You do have to use a negativematerial that separates easily fromthe partially cured photopolymer.I’ve found Kroy Color to be a goodway to get a totally black and totallydense negative from the PostScriptpaper positive original. Just KroyColor in the usual way, but then

63.6

May, 1990

throw away the baby and keep thewashwater. That’s right. You throwaway your original, and instead usethe remaining "scrap" Kroy Color asyour totally opaque negative.

You have to watch out for anyfill-in on centers of small "e" lettersand such, but Kroy Color does thejob with few hassles. Their blue me-tallic works especially well.

Extra kerning is also a good idea.The Grantham stuff is aimed at a

three-tier retail craft market, so theindividual pricing is higher thanyou’d like to see. At least for theserious desktop finishing uses. Inparticular, $1000 seems a tad muchfor an exposure unit that you canbuild yourself from a fluorescentfixture, two bulbs, and a timer. Oreliminated entirely by going solarand using the sun instead.

But all of Grantham’s productsand supplies are top quality. Theyare solidly designed, properly built,optimally packaged, and are lots offun to use.

IMEC, a Grantham competitor,offers a refundable $15 video whichgives you more details on rubberstamps in general. Sadly, IMEC’sprices border on the absurd.

Because time and hassle equalsdollars, you can decide for yourselfwhether to steal the plans or else gowith what’s on the shelf.

What is This Month’sPostScript Utility?

We’ll have our PostScript utilityearlier than usual this month, sincewe need the results for what is tofollow. This one has been numerouno on the request line.

As we found out last month, it isnow a simple matter to grab anyPostScript type I and type III fontpath. This new opportunity verymuch enriches what PostScript isand what you can do with it.

Figure three shows you anotherway for you to record plaintext fontpaths. It will work on any type I ortype III font, be it internal, down-loaded, custom, or created on thefly. It works by bypassing the fontlockout on pathforall and directlyaccessing the underlying operator.

You simply select your font andthe character in that font, and runthis utility. A recordable proc getsreturned to the host that includesboth the width to the next characterand a plaintext description of thoseinvolved moveto, lineto, curveto andclosepath operators.

The imaging is initially done at1000 points, which bypasses mosthint machinery. You can alter this toinvestigate the hinting used at anyparticular point size.

I have only tried this utility on alate LaserWriter Plus, an NT, and anNTX, so it may or may not work onother machines. Be sure to let meknow. I have included some shorttime delays to simplify your hostrecording. You can eliminate theseif your comm setup lets you. Thesimplest host recorder I know of isAppleWriter’s [Q]-I [esc]-R.

To use your returned font just doa T exec or whatever. Then stroke,fill, or clip your path. The width willremain on the stack as a real num-ber, easing moving on to the nextcharacter. If you do not need thiswidth info, be sure to pop it off thestack each time.

To scale your final font, divide itby 1000 and then multiply by yourdesired point size.

You may also want to replace the returned moveto with a mt and so on,to simplify the redefinitions we areabout to look at. Which also willshorten your files. Do note that bothlt and ln are reserved PostScriptwords, and must not be used as alineto substitution. The li seems towork just fine here.

PostScript level II has eliminatedthe font lockout completely.

How Can PostScript UseNon-linear Transformations?PostScript achieves its device in-

dependence by keeping a separateuser space and a device space. To getbetween these two, linear transfor-mations are continuously made onthe fly to perform all your requestedtranslates, rotates, and scales. Theselinear transformations are also re-ferred to as the currentmatrix.

Specifically, the user space and

the device space are related by…

x’ = Ax + By + C y’ = Dx + Ey + F

where A is the horizontal scaling, Bis the amount of lean, C sets thehorizontal offset, D is the amount ofclimb, E is the vertical scaling, and Fis the vertical offset.

While this can let you do greatthings, the stock PostScript lineartransformations only allow you totranslate, rotate, or scale an entirepath at once. It would be infinitelymore powerful to be able to indi-vidually change the translation, therotation, and scaling for each andevery point pair involved in everyindividual moveto, lineto, or curvetooperator in the path.

Such a nonlinear transformationwould let you "map" any PostScriptpath or routine onto any surface.Obvious examples would includeperspective and "star wars" letter-ing, writing on a scroll, isometriccylindrical and spherical lettering,twisted surfaces, and intentionaldistortions. The new opportunitieshere totally boggle the mind.

Now that we can grab the fontpaths, it becomes a simple matter toredefine each moveto, lineto, andcurveto operator so that each x and ydata pair gets translated to somenew x’ and y’ according to some setof suitable rules.

For instance, figure four showsyou a new nlashow or a "nonlinearashow" operator that will transformeach and every data point in yourtext by a rule or set of rules you candefine as nlt, short for a non-lineartransformation.

Finally, figure five can show youhow to create a large 3-D two pointperspective letter.

Nonlinear transformation givesyou an infinitely large new world toexplore, of which perspective isonly the tiniest of obscure niches.

What new can you think of here?We can wrap things up with our

usual reminders that most of thosesources I’ve mentioned appear inthe Names and Numbers appendixand that you can get tech help bycalling (602) 428-4073. ❆

Don Lancaster’s

ASK THE GURUJune, 1990

PostScript fractal fernsThe secret commons ploy

Toners for T-Shirt printingShared SCSI comm speedup

Duplex printing fundamentals

64.1

Fig. 1 – How High Speed Shared SCSI Comm Works.

SCSI 8 / 9

LaserWriter NTXor any other SCSIPostScript printer

SCSIHard Disk

any SCSIcommunicating

computer

optional serial command line

With shared SCSI comm, both the host and the printer can share one or morehard disks, and talk to each other at a 400 kilobaud or higher rate.

Since most files will already be on the disk, the usual load-send-print cycles canoften be eliminated, for another 2:1 speedup. Direct host access to font cachesand bitmaps can give even faster results.

Command or control bytes can be sent via the older serial or AppleTalk commlines. This is still fast, since only a few bytes are usually needed.

Apple has released two bigbinders for all their Appleand Mac technical notes,

with free copies going to user groupambassadors. You can get your owncopies from APDA, or else becomean ambassador yourself.

Ambassadors receive all sorts offreebies, including tech notes, CDROM disks, other software, videos,AppleLink access, special purchaseoffers, handouts, and bunches ofother propaganda. As we’ve seenbefore, you can get a complete list ofall your local Apple user groups at(800) 538-9696, extension 500.

Apple’s new high speed SCSIcard for the Apple IIe or IIgs surelooks interesting, and I’ve pickedone up for testing. Most users willwant this card to add a ProDOS

compatible hard disk onto theirsystem. So far, their documentationis poor, and several major unfixedbugs are present. I will be mostlyusing mine to directly read andwrite to my LaserWriter NTX harddisk from inside AppleWriter. Moreon this below.

Apple has also published thepreliminary developer versions oftheir system 7.0 software for theMac. Cost is $20 for CD ROM or $90for ordinary disks. There seems tobe a not-too-subtle hint here onApple’s preferred software media.

Yes, the new Royal outline fontstuff is here in 7.0, but is renamedTrueType. To me, the vibes feel justplain wrong on this one. Reallydumb even.

Their TrueType has absolutely no

technical advantage, no marketingadvantage, and zero performanceadvantage over the way PostScriptused to be several years ago. I guessthe real bottom line is that Post-Script flat out ain’t broke.

Speaking of which, Adobe is upto all sorts of interesting things. Aswe’ve seen, they’ve released theirblack book on the Type I Font Formatwhich reveals all. I’ve got these instock, or you can get a copy directlyfrom Adobe Systems.

Adobe newly introduced a highend PostScript emerald controller.Emerald should dramatically speedup future PostScript phototypeset-ting and fancier laser printing. It isRISC based, and apparently doesspecial hardware speedup tricks forBezier cubics and BitBlts.

Adobe has also just announcedPostScript 2.0. This is mainly a wayof picking up and consolidating allof the little changes and improve-ments that got added over the pastseveral years. Things like compres-sed file formats, composite fonts,bug repairs, improved color half-tones, and immediately executedliteral names.

Big new features include openfont paths (!), automatic forms, anddramatic speedups for user proc-cached routines.

The other new stuff now includesdynamically allocated memory (nomore dictfull errors) and a moreuniform linewidth on lower res-olution printers.

PostScript 2.0 is also considerablyfaster, owing to tricks learned in theprocess of developing the DisplayPostScript. Apparently their inter-preter doesn’t have to go as deep asoften as it did originally, leading toa significant speedup.

Full details on Level II appear inthe newly revised red book II andotherwise known as the AdobePostScript Reference Manual. I do tryto keep copies of this 800 page

64.2

June, 1990

Fig. 2 – How to use the commons ploy.

NTX DISK MAP

header

Sys/Directoryfile

Comm/afile

header

blocks pages

The NTX uses itsfull file system in thenormal way, except forcreating and preservingthe Comm/a commonsimmediately after an init.

Other NTX files can betransferred to and fromthe disk commons areaas you require.

The HOST usesa low level block writeor block read code toaccess the commons

using 512 byte blocks.

The three bytes beforeeach filename in the

system directory showthe file header page.

– $06– $07

– $B8– $B9

$0E –

$172 –

handbook in stock for you here atSynergetics.

As a reminder, our major newPostScript BBS system should begoing great guns on GEnie by thetime you read this.

Let’s see. You can now get myBook-on-demand reprints of mosteverything you see here in Ask theGuru or over in my LaserWriter Cor-ner column. Or for that matter, overin my Hardware Hacker columns inRadio-Electronics or all the BlatantOpportunist stories in Midnight En-gineering. Call for more info.

We have some heavy duty stufffor this month…

What is SharedSCSI Comm?

How would you like to instantlyspeed up all your PostScript make-ready times by 30:1? This is triviallyeasy to do. If only we can get theprinter designers to listen to whattheir customers want. Or if you careto get sneaky on your own.

As we’ve seen in past columns,most PostScript output is baud ratelimited because of those horriblyprimitive comm channels in usetoday. Being baud rate limited is aserious problem when book-on-demand publishing, and wheneveryou are handling color seps or anyother large images.

And this is bound to get muchworse as we see faster chips, fasterPostScript firmware implementa-tions, and more and more peopleroutinely pseudo-compiling all oftheir PostScript files.

To refresh your memory, an IBMtypically talks to a LaserWriter at a10 kilobaud effective baud rate. AnApple IIe could run at 57 kilobaudeffective when bare metal drivingits game paddle port.

But AppleTalk sending PostScripttypically runs around 17 kilobaudeffective on an older Mac or 34 kilo-baud effective on a Mac II.

Because of its expense, its hostlimitations, and its unacceptablyslow speeds, AppleTalk is clearlyunsuitable for serious PostScriptlaser printing.

But SCSI communication blazes

along at a minimum of 400 kilo-baud, and potentially can run at fiveor more times that rate.

Obviously, SCSI comm is the onlyroute to pick with PostScript. Alsoobviously, few PostScript printersnow offer SCSI and some of thosethat do have made the SCSI accessunbearably difficult. Not to mentiontotally undocumented.

So, I would like to propose apreviously unthunk of communi-cations setup which offers you asmuch as a 30:1 speedup in all thePostScript makeready times, willwork with any host, allows simpleand cheap networking, and offerslots of other advantages. I call thisscheme Shared SCSI Comm, and itappears in figure one.

Few people realize that SCSI wasdesigned from the ground up toallow multiple hosts. That’s right.Just as one computer can host mul-tiple SCSI hard drives, several com-puters can share the same SCSI harddisk, a CD ROM, PostScript laserprinter, or whatever. Presto. Instantand fast networks.

One reason this has not been donetoo much in the past is that manysoftware programmers have beenkeeping their actual SCSI operatingsystems secret. Another problem isknown as adjudication. The funniestthings happen should Purchasinggrab a file, Production snatch thesame old file, and then Purchasingrewrite its new file to disk. It’s evenmore hilarious when the file that’sinvolved is a CEO’s list of mergersand acquisitions.

In a laser printing environment,adjudication should be rarely, ifever, needed. So, for all of our uses,adjudication is a simply avoidablenon-problem.

Another SCSI network restrictionhas been its limited range. But, aswe have seen a number of timesbefore, if you cannot reach out andtouch your PostScript printer fromyour work station, its utility to youwill drop dramatically. Contrary topopular belief, PostScript printersare definitely not suitable for longdistance networking.

Here is how shared SCSI comm

64.3

ASK THE GURU

Fig. 3 – Some bare metal SmartPort commons code.

(A) HD.READBLK.300 reads a 512 byte block to host start location $1000 …

0300: RDBLK 20 10 C4 JSR $C410 % Dispatch address of SCSI sub 0303: 41 DFB $41 % Command for extended block read 0304: 0A 03 DW $030A % Location of command list 0306: 20 A8 FC JSR $FDDA % Hex error to screen (00 = none) 0309: 60 RTS % Return to calling routine

030A: CMDLST 03 DFB $03 % Three parameters 030B: 01 DFB $01 % Unit number 030C: 00 10 DW $1000 % Data buffer low bytes 030E: 00 00 DW $0000 % Data buffer high bytes 0310: 72 01 DW $0172 % Disk 512 block low bytes 0312: 00 00 DW $0000 % Disk 512 block high bytes

(B) HD.WRTBLK.300 writes a 512 byte block from host start location $1000 …

0300: WRTBLK 20 10 C4 JSR $C410 % Dispatch address of SCSI sub 0303: 42 DFB $42 % Command for extended block write 0304: 0A 03 DW $030A % Location of command list 0306: 20 A8 FC JSR $FDDA % Hex error to screen (00 = none) 0309: 60 RTS % Return to calling routine

030A: CMDLST 03 DFB $03 % Three parameters 030B: 01 DFB $01 % Unit number 030C: 00 10 DW $1000 % Data buffer low bytes 030E: 00 00 DW $0000 % Data buffer high bytes 0310: 72 01 DW $0172 % Disk 512 block low bytes 0312: 00 00 DW $0000 % Disk 512 block high bytes

(C) A simple BASIC routine to read 64 disk blocks to host start location $1000 …

100 PRINT CHR$(04); BLOAD HD.RDBLK.300 110 POKE 784,0: POKE 785,0: POKE 786,0 : REM LO-MID-HI START 120 FOR K = 1 TO 64 130 CALL 768 : REM READ DISK 140 POKE 781, PEEK (781) + 2: POKE 784, PEEK (784) + 1 150 PRINT: NEXT K 160 END

(D) Some more common error messages…

$00- None $11- Bad Unit Num $2B- Write Protect $01- Bad Command $27- I/O Error $2D- Bad Block $04- Bad Param Count $28- No Drive $2F- Off Line

works: A host computer with anyold SCSI driver is connected to oneor more SCSI hard disks. Your lasthard disk in your chain also getsconnected to a SCSI PostScript laserprinter such as a LaserWriter NTX.Priorities are established so that thelaser printer is the boss.

Your host computer places itsPostScript files onto the disk. Theprinter takes them off. All at a 400kilobaud or higher effective rate.

Wait. There’s even more. If yourword processor is routinely writingand saving to the laser printer harddisk, the file is already there at printtime, and you can eliminate yourusual load-transmit-print cycle.

Which could further double youreffective comm speeds. And someword processors insist on throwing

in extra carriage returns. The needto patch around these extra returnswith the usual "\r" could get elim-inated with shared SCSI comm.

If you are an advanced PostScriptprogrammer, direct host access tothe PostScript fonts and font cacheon the hard disk can dramaticallyimprove what you do and how youdo it. Better yet, it might be possibleto save partial or entire page bit-maps to your hard disk. We havelooked at this proc cacheing stunt inprevious columns and in the Ask theGuru reprints. Ultimately, you caninstant print an entire book simplyby using page bitmaps, regardlessof how fancy your pages are.

Adobe is working up some newstandards for SCSI comm, sharedand otherwise. Do send in for their

new ap notes, and give them someuseful user input.

As I see it, there are three mainroutes to shared SCSI comm. One isfor those printer manufacturers toprovide us with firmware patchesthat give us direct SCSI commun-ications on a par with the existingserial, parallel, and the AppleTalkcomm setups. Including a two wayhard disk "pass through" mode.

A second route is to publish andproperly document the entire SCSIoperating systems and hard diskformats in use for each printer, andmake runnable copies of it availablefor independent use by any host.

The third route is something youcan do here and now, instantly, andwithout any help from "them." Youdo have to be willing to hand bash afew bytes to accomplish this. For allof the secret details…

Tell Me About TheCommons Ploy.

Here is a sneaky way you caninstantly add a direct shared SCSIcomm to your existing LaserWriterNTX. You can also make backupcopies of protected SCSI disks onany system, and read and write anydata to or from them. Even with atotally locked, inaccessible, and atop secret operating system.

But you do have to carefully bashsome bytes at the machine languagelevel, and you can easily trash outall the files on your hard disk if youare not ultra careful. The method isalso a tad on the cumbersome sideand requires extreme care.

I call this the commons ploy, andthe general scheme appears for yourviewing pleasure in figure two.

Here is how the commons ployworks: The LaserWriter accesses itshard disk with its own internal andproprietary operating system. Thehost computer will access the samehard disk directly at the block readand block write level. Several key-strokes under the SmartPort on anApple IIe is ideal for this.

When you initialize your Laser-Writer hard disk, you immediatelyand very carefully create one ormore dummy files of longer than

64.4

June, 1990

Fig. 4 – Some fractal and chaos science resources.

Beauty of Fractals, by Peitgen and Richter

Earlier text that is both a coffee table book and a source of usefulalgorithms. From the same publisher that did the Science of FractalImages. (Springer-Verlag, 1986)

BYTE Magazine

Occasional fractal articles and reviews. See A Better Way to CompressImages, January 1988, pp. 215-223 in particular.

Chaos – Making of a new Science, by James Gleick

Interesting and easily read survey of the entire field of fractals andchaos science. Frustratingly shallow at times. (Viking, 1987)

Fractal Geometry of Nature, by B.B. Mandlebrot

The original "horse’s whatever" book that started it all. Mind blowingartwork in an otherwise unreadable and excessively egocentric text.(W.H. Freeman Press, 1982)

Science of Fractal Images, by M.F. Barnsley et. al.

Outstanding collection of useful hands-on fractal information. A goodstarting place to extend your own research. Includes algorithms and agood bibliography. (Springer-Verlag, 1988)

SCIENCE Magazine

Occasional fractal and chaos science articles and reviews.

SCIENTIFIC AMERICAN magazine

Occasional fractal articles and reviews. See their ComputerRecreations column for ongoing info and comments.

SIGGRAPH Proceedings

Far and away the best annual computer graphics show. Includes thelatest and best of fractal and chaos science developments, on all threelevels – theoretical, tutorial, and artsy-craftsy. (Siggraph-ACM Press,annually)

needed length and having names ofsomething like Comm/a, Comm/b,and so on. You then find out exactlyon which blocks all these files aresitting.

You next use your host to eitherread or overwrite these fixed positionfiles using any plain old block writeroutine. Your LaserWriter doesn’tknow its textfiles have been cor-rupted and still uses the files in thenormal manner. All the directoryentries remain the same.

Yes, it works. And, yes, a simplePostScript ending quit commandcan ignore what is left of the file thatyou just wrote over.

Specifically, the LaserWriter usesa simple operating system alike butdifferent somehow from plain oldApple ProDOS. This operating sys-tem uses pairs of 512 byte blocksformed into 1024 byte pages, andinitially builds up from page zero.Except when it hides somethingsneaky in "high core".

Each file consists of one headerpage, followed by one or more dataor text pages. The system directorystarts on page $06 or block $0C, andall the actual filename entries starton page $07 or block $0E.

Those three bytes immediatelybefore each filename are the pagestarting address for each directoryentry. Note that these bytes are in ahigh byte first order.

Once again, double the hex pagenumber to get the block number.Data or text actually begins on thesecond page of any individual file.

On a hard disk init, the followingfiles get written, starting at pagezero and working up…

%disk%Sys/Root0 %disk%Sys/Root1 %disk%Sys/AllocMap %disk%Sys/Directory %disk%FC/NameToNID %disk%FC/MIDToFile

You then add one or more fixed"commons" files of names…

%disk%Comm/a %disk%Comm/b

You must do this immediately onyour init, before any font caches (or

anything else) gets written to disk.Be certain to check, but you shouldfind your first commons file having its header placed on page $B8, equalto block $170, The actual text startson page $B9 or block $172.

Those text pages are plain old8-bit sequential low ASCII textfileswithout any headers, trailers, orchecksums.

As you know, I just picked up anew Apple II High Speed SCSI card.Since it is insanely faster, cheaper,and easier to go bare metal on a IIecompared to a Mac, I picked thisroute for my initial experiments.Figure three shows you the simple

procs which let you read SmartPortblocks and write SmartPort blocks,along with a trivial BASIC listingthat lets you back up your Laser-Writer hard disk 32K at a whack.Figure three also summarizes theSmartPort error messages you mayget on your screen.

Note that I put my SCSI card inslot number 4. If you use a differentslot, you will have to find a newSmartPort dispatch address. For slot#n, your dispatch address will be$Cn00 + PEEK ($CnFF) +$03. The slot#4 dispatch address is $C410.

Your commons files can now bedirectly used by writing onto them

64.5

ASK THE GURU

Fig. 5 – Fractal fern done in PostScript.

/problistcreate {mark /counter 0 def probabilities {128 mul round cvi {transforms counter get}repeat /counter counter 1 add def} forall counttomark 128 sub neg dup 0 gt { [1 0 0 1 0 0]repeat} {pop} ifelse] /problist exch def} bind def

/doit {problistcreate 1 1 20 {problist rand -24 bitshift get transform 2 copy moveto 0.001 10rlineto} repeat newpath numdots {problist rand -24 bitshift get transform 2 copy moveto 0.001 0rlineto stroke} repeat} bind def

% /// demo - remove before use. ///

/numdots 6000 def % increase for denser image; decrease to print faster

/transforms [ [0 0 0 .16 0 0] [.2 .23 -.26 .22 0 1.6] [-.15 .26 .28 .24 0 .44][.85 -.04 .04 .85 0 1.6] ] def

/probabilities [ .01 .07 .07 .85 ] def

1 setlinecap 0 setlinewidth 200 300 translate 30 dup scale doit showpage quit

with your host and then runningthem with a simple command stringof a few bytes sent over your usualserial or AppleTalk channel.

To permanently keep any file,load the commons file into the NTXand then save it under a new namein a different place on the disk.

To return an existing file to thehost, load the file into the NTX, padthe file up or down to match the oldcomm file length, delete your commfile, and then overwrite it with thenew file. Your host then can readthe blocks at the expected place.

All of which gets a tad awkward.But the commons ploy still seemsmuch faster and far more open thanany other route that is immediatelyavailable for your use.

I am working on AppleWriterpatches that directly let you write tothe LaserWriter disk. Let me knowif you have any interest in these.

Let’s see. The Apple white book,otherwise known as the LaserWriter

Technical Reference has all of theusual LaserWriter SCSI commandsin it. I’ve expanded and added tothese in past issues and the Ask TheGuru reprints. You also may find theIIgs Firmware Manual and the notyet updated Apple II SCSI Card Tech-nical Reference Manual from APDA tobe most helpful.

Needless to say, if you miss thecommons area and overwrite thewrong block, you trash your harddisk contents and have to start over.

Naturally, it would be best towork directly with Adobe’s existingdirectories. But so far, they have notpublished their formats. But maybewe can fake it. Stay tuned.

Let’s make a contest out of this.Just contribute something to thisshared SCSI or the commons ploydialog, or else show me equivalentstunts that can make a Mac or a PCalmost as good as an Apple IIe.

We’ll have all our usual IncredibleSecret Money Machine book prizes on

this, along with an all expense paid(FOB Thatcher, AZ) tinaja quest fortwo going to the best of all.

What is Duplex Printing?Duplex printing is simply prin-

ting on both sides of any sheet ofpaper. You do so in a single printerpass, without user intervention.

The main advantage of duplexprinting is that it is self-collating,meaning that your documents canarrive ready for a binding. Whicheliminates bunches of labor and lotsof potential error sources.

In addition, a duplex printingminimizes paper jams and theirseriousness. Done the "old way", ajammed page in the middle of thebackside pass of a book-on-demandjob can trash most of the book. Thishappens since the rest of the pagescould end up with the wrong backson them. With duplex printing, ajam usually trashes only one singlepage that is easily replaced.

Duplex printing also saves you onpaper and filing costs. First, becauseonly half as many sheets are neededwhen printing on both sides, andsecond, because your scrap will of-ten be considerably less.

At this writing, there is only onegame in town when it comes toduplex printing. That one is theHewlett-Packard IID. I’ve recentlyordered a used one from Thompson& Thompson so I can explore somerather badly needed productivityupgrades to my Book-on-demandpublishing.

This machine has several majorand painfully obvious flaws, so I’llcertainly flush it just as soon asanything better shows up.

There is no provision for a SCSIcomm essential for high speed anddownload-free access to all of yourbook-on-demand pseudocompiledpages or for the permanent storageof high quality fonts and caches.The maximum baud rate is onerather unfunny joke at 19200. At 75pounds, the IID would also make afair to middlin boat anchor.

While I haven’t tested the brandnew Adobe PostScript 55 cartridgefor this beast at this writing (stay

64.6

June, 1990

tuned), I do feel that any cartridgePostScript solution will always besignificantly slower than using aprinter designed from the groundup to inherently speak PostScriptas its native language.

Duplex printing requires doublememory, since one page makes upas the previous one prints. FourMegabytes is essential.

What’s in the IID? The top half ismore or less a plain old Canon SXengine. At the rear is a new switch-back mechanism. And underneath isthe return path.

On the first pass, the front sidegets printed and the page goes outto the switchback assembly. Thisreverses your paper direction andsends the sheet back underneath themain printer. The paper then makesa 180 degree turn back up into theoriginal registration assembly, andpositioned blank side up. From thatpoint, the back side gets printed justas if a new sheet was fed. Softwareselects a "book" or a "calender" bind-ing registration.

A second input paper tray is alsoprovided, since the duplex paperpath is there anyway. While thissecond lower tray is handy, notethat heavy cover and index stockcan only be fed from the upper tray.You are also only allowed to duplexprint normal weight papers.

Amazingly, the per-side printingtime is only modestly longer thanthe 8 PPM of a straight SX engine.

As with their other machines, HPhas an outstanding service manualavailable to anyone. Part number is#33447-90904 and costs around $99.As we have seen in the past, theirprevious CX manual (#02686-90904)and SX manual (#33440-90904) makeexcellent Apple LaserWriter serviceand repair references.

Just ignore all of their arrogantnonsense found in these manualsconcerning toner cartridge refilling.Since refilled cartridges reduce yourper-page toner costs by as much as20:1, only an absolute idiot wouldnot refill their cartridges for mul-tiple reuse.

I’ll have lots more to say on thisbeast once I’ve done some more

testing. Because of the lack of SCSIcomm and its inherently slow wayof implementing PostScript, the IIDis clearly unsuited for its intendedpurpose. But duplex printing mustbe explored here and now.

Please Update Me OnT-Shirt Printing

As you may have noticed, it getsreally difficult to hand feed a T-Shirtthrough your LaserWriter.

Especially if someone happens tobe wearing it at the time.

It seems we do have a brand newbreakthrough for this month in aform of heat refusable fabric toners.These let you print your images topaper and then iron your trans-ferred toner directly onto a fabric.But first, let’s quickly review someof our earlier options on this.

Your PostScript-speaking Laser-Writer is ideal for generating initialartwork, especially any involvingcircular or arc-justified text. Donethe "old way", you print up reverseimages of your artwork and text onpaper, and then photograph theimage to in turn cut a silk screenmaster. This route gets handy whenlots of identical shirts are needed.

We have looked at the franchisedSublicolor process in previous issues.It does seem to work for T-shirts,but helpline lore seems to feel thatthis is both a very overpriced andlimited quality system using ancientGestetner duplicator technology.

One product we looked at wasTransfer Magic. You can buy this atyour local cloth or notions store, orget it direct in quantity through EZ-International. This is basically somestickyback glop on a transfer sheet.

You first create a reverse papercopy of your toner image and thenstick the Transfer Magic to it. Thenyou soak your Transfer Magic inwarm water, ultimately dissolvingall the paper out from underneathyour still-stuck toner. Finally, youiron the result in place onto your T-shirt or whatever. Since the tonerends up between the cloth and thetransfer glop, it will get protectedfrom most scuffing and wear.

Yeah, it is completely washable,

and looks no worse than most otheriron-ons. Several colors are possiblewith multiple toners, so long as theregistration is not critical.

On to the new goodies. You cannow buy heat refusable transfer toneras intended specifically for iron-onfabric use. You use it as you wouldany other toner cartridge in your CXor SX based laser printer. A paper orpolyester intermediate image getscreated which in turn is ironed ontothe cloth. While the cartridge costsare still rather expensive, your finalper-image costs are well under aquarter. "Short" cartridges of muchfewer copies are also offered.

This new toner should eventuallybe available from just about any re-filling supply wholesaler. For now,three stocking sources include BlackLightning, Lazer Products, and fromThompson and Thompson.

Compared to those iron-on fabricribbons for dot matrix printers, youshould end up with higher quality;a faster and quieter printing; andlower costs.

Black Lightning’s newly releasedcolors sure look good, especially theblue and the new true black. Theiroriginal black was more of a gray.Free samples are available.

Outside of a few quick T-shirts, Ihave not yet had a chance to fullycheck this stuff out, but its obvious-ly something that is sorely needed.This refusable transfer toner shouldalso be useful for low end hackerprototype printed circuits and dial-plates as well.

Other artsy-craftsy stuff shouldalso eventually happen, possiblyincluding glass etching, sandblast-ing, Batik, or wooden plaques. Theprinted circuit stuff is a big topicwith me, so please keep in touch onthis.

What is This Month’sPostScript Utility?

I thought we could have some funwith PostScript fractals this month.

There’s a new endeavor known asChaos Science. Actually, it’s just aloosely knit collection of all sorts ofunusual old and new stuff, much ofit only weakly related if at all. As a

64.7

ASK THE GURU

general rule, if it keeps a math freakoff the street at night and if it lookspretty in an alien sort of way, then itcan be called chaos science.

Since chaos science is futuristic,utterly and totally bizarre, and morethan eminently hackable, it shouldbe of foremost interest to most ofyou Computer Shopper readers.

Figure four will give you a quicksummary of a few main resources inChaos Science. You will probablywant to start with James Gleick’sChaos – Making a New Science. Thisone is a thorough and easy-to-readbut occasionally shallow intro.

The horse’s whatever document,of course, is Mandlebrot’s FractalGeometry of Nature. While more thanpretty to look at, this text is prettynigh unreadable and is laughinglyand pompously egocentric.

The book I am currently the mostimpressed with is the new Science ofFractal Images, especially in chapterfive. A good summary did appear inthe January 1988 Byte under the titleA Better Way to Compress Images.

One of the things that struck meabout this great book and the Bytesummary article was that all thesample BASIC and C programs wereforever making those complicatedtranslate-rotate-scale transforma-tions. All the kind of stuff whichPostScript handles free, invisibly,routinely, and automatically all ofthe time. Contrary to those direnegative comments early in the redbook, PostScript should be nearlyideal for fractal geometry uses, alongwith most anything else involvingchaos science.

To test out this theory, I havetranslated the original code into thePostScript proc of figure five. Thisgives you the fern, the second mostpopular fractal image of all time.The Mandlebrot Set is numero uno. I am saving it for later.

Even though there is an awful lotof slop left in the code, I was quitepleased with both the final resultsand its speed under PostScript. Ielected to create a custom proba-bility table once ahead of time,rather than making lots of slowerindividual probability selections on

the fly. Providing for 128 entries inthis table, rather than the expected100, does yield us some additionalspeedup and simplification. A lotmore cries to be done.

When you are experimentingwith the fern on your own, be sureto change the numdots variable tosomething in the high thousands foryour original fast printing samplesthat will image in a few seconds to aminute or two. Later on, you couldincrease numdots as high as youneed to for top quality final imagesthat might take hours to print intheir larger sizes.

One big gotcha: The six elementmatrices used by the original fractalpeople and PostScript differ some-what. To get from one to the other,simply interchange the second andthird values in the array.

There are some amazingly bizarrethings about the figure five fernimage. First and foremost, largersizes of this fern original end uphauntingly beautiful. In fact, I’venever seen any PostScript imageanywhere that even comes close.

Second, the smaller pieces of thefern are definitely not a smaller, orself-similar copy of your whole pic-ture. Unlike ordinary pictures, asyou magnify, additional unique de-tail appears. But that is what fractalstuff is all about.

Third, although an apparentlyrandom process is used that picksfour tasks having random proba-bilities in random orders, you’llalways end up with the same finalimage! This will happen regardlessof which random numbers get usedin which order.

This is a stunning example of astrange attractor, otherwise knownas the holy grail of fractaldom. Asyou just might expect, others areseeking out the possible strangeattractors thought to underly thestock market prices and weather.

Fourth, believe it or not, the entirefern is coded as only 28 numbers ina small data array! There is no dif-ference whatsoever between yourfern and untold billions of otherwildly different images except forthese 28 numbers.

We thus have one absolutelymind-blowing picture compactionscheme going on here. For a fullpage PostScript fern, your datacompaction can approach 300,000:1!Unfortunately, though, the imageregeneration times do get out ofhand with compaction levels thatare this high. You can forget aboutreal time. In theory, by going to justa few more numbers, we can createany image at all.

Fifth, and finally, this routinereally does appear exactly like anauthentic Black Spleenwort Fern.Now, Black Speenwort Ferns havebeen around for a rather long time,and they sure are beautiful, butnobody ever accused them of beingvery bright. Could the exact sameprocess be used by the real fern toteach itself how to grow?

To me, the odds are overwhel-ming that this is the case. We thusappear to be tampering with someheavy duty stuff here.

Tellyawhat. For the second of thismonth’s contests, just send me 28numbers that create an image otherswould consider interesting. Or else,show me the absolute fastest routineyou know of to set a single pixel in afinal PostScript bitmap. This getstrickier than it sounds.

This fern code is an excellentclone buster. While it runs great onany real PostScript printer, it canand will give most, if not all, clonesfits. So much for compatibility.

If you have any problems withthis code (it has been verified manythousands of times by now), rerunthe fern on a genuine Adobe Post-Script printer.

Oh yes. If you do find the strangeattractor that underlies stock marketprices and send it to me, I’ll be mosthappy to send you five of my moneymachine books instead of just one.In a fit of generosity, I might evenconsider a second tinaja quest.

We can wrap things up with ourusual reminders that most of thosesources I’ve mentioned appear inmy Names and Numbers appendixand that you can get tech help andoff-the-wall networking by callingor writing me. ❆

Don Lancaster’s

ASK THE GURUJuly, 1990

PostScript point ruleApple to HP interfaceLow cost color optionsIID duplex printer testConverting Adobe files

65.1

Fig. 1 – My critique of the duplex LaserJet IID.

1. Any duplex printer seems slow because each page counts double, since thebackside has to print first, and because efficient pipelining only takes placeon multi-page jobs.

2. When doing real-world duplex printing tasks, the IID really is as much as tentimes slower than a NTX or a PS Turbo 820. See figure two.

3. Duplex copypage is fatally flawed, eliminating as much as 30 percent of themarket for this machine and causing inexcusable slowdowns.

4. A SCSI hard disk is absolutely essential for serious duplex printing. This isconspicuously absent on the IID. So is shared SCSI comm.

5. The machine is extremely frustrating to use, caused by poor comm code,slow speed, excessive error trapping, and a flakey remote reset.

6. The font cache can be blown up and hung if you throw too fancy a series ofjobs at it. Pixel line remapping is a no-no.

7. Cartridges are not conveniently refillable without major modification.

8. Bitmaps are difficult to access for reuse.

9 Minor problems: Illegible LCD display; no tray chaining; no handles; tonerdensity not adjustable during a job; max baud rate too slow; excessive jamson parchment cover stock.

I t sure has been a zoo aroundhere lately. At any rate, I’vemanaged to buy, beg or steal a

whole pile of PostScript printers,and will be running bunches of longterm real-world tests on them. Lookfor the Hewlett-Packard IID resultsthis month, and details on the fastand exciting QMS Turbo 820 in mynext column.

Adobe has announced PostScriptlevel II. This combines faster speed,enhanced color processing, and an"internalizing" of most of the earlierimprovements picked up along theway. Expect a new red book some-time this October. Meanwhile, youcan contact Adobe Systems directlyfor more details.

We now do stock the revised RedBook II. Call (602) 428-4073 for anyadditional info. Besides full detailson Level II, this 800 page updateincludes plenty of EPS and displayPostScript info.

Apple is now offering a ROMupgrade for their LaserWriter NTX.Cost is in the $120 range. These newchips cure several of the greviousbugs in their flaky hard disk oper-ating system, and improve bothAppleTalk and emulations. Moredetails after I have had a chance totest them out.

Expect some really fancy featureson the newly introduced PostScriptprinters. Such as an auto three wayserial network, and "fuzzy logic"that is swift enough to analyze theinput data stream and select rawPostScript or switch in a suitableemulator. Thus, PCL data streamscan automatically print as PCL,HPGL as HPGL, TEX as TEX, Diabloas Diablo, and, of course, PostScriptas PostScript.

All this on the new PS-410 fromQMS, that utterly and completelyblows away the new Apple PersonalLaserwriter NT. Besides being amuch faster, considerably lighter,and far cheaper implementation of

the same Canon engine, the PS-810includes eight more fonts, a parallelport, a more powerful 68020 CPUand HPGL emulation.

The non-PostScript Personal Laser-Writer SC, of course, is an outrightjoke that is far beneath any furthercomment here.

Several do-it-yourself brand newreplacement hard coated drums are now widely distributed to the enduser. These let you refill your SXcartridges dozens or more times atbetter than new performance. Oneof the leading suppliers is CopyMateProducts, while others advertise inthe Recharger trade journal.

Let’s see. We are now shippingmy LaserWriter Secrets book & diskcombo, and we do have many hun-dreds of new downloads availablethrough Genie. Write or call per theappendix for more info.

IID or not IID?That is the question. Whether tis

nobler to suffer all the slings and

arrows of outrageously wimpy per-formance just to explore future du-plex printing opportunities.

I’ve been thoroughly end-userand real-world testing the Hewlett-Packard Laserjet IID duplex printerlately. We’ll start with the bottomline. This beast is disappointinglyslow. The PostScript copypage oper-ator does not work properly whenduplexing. And the machine is farmore frustrating to use than any ofmy other PostScript printers. Thesummary of the IID problems ap-pears as figure one.

On the other hand, the duplexprinting sure is a lot of fun to playwith and dramatically lowers yourscrap rate and increases employeeproductivity and morale. And noquestion that duplex will eventuallybe the only way to go for Book-on-Demand publishing.

And no question that I’ll continueto actively use my IID as a produc-tion machine, warts and all.

Any duplex printer starts off with

65.2

ASK THE GURU

Fig. 2 – Some PostScript IID Click-to-Clunk times.

1. Meowwrrr, a graphic intensive cartoon character from my PostScriptShow and Tell series…

LaserJet IID 70 secondsLaserWriter Plus 64 secondsLaserWriter NTX 31 secondsTurbo 820 PS 27 seconds

2. A three column page makeup including one figure, a header, and afooter, using my gonzo justify…

LaserJet IID 116 secondsLaserWriter Plus 97 secondsLaserWriter NTX 56 secondsTurbo 820 PS 48 seconds

3. A fancy double-sided brochure including art cuts and one customself-mailer address…

LaserJet IID 75 secondsLaserWriter Plus 62 secondsLaserWriter NTX 29 secondsTurbo 820 PS 23 seconds

4. One hundred custom autoaddressed copies of the previous brochure…

LaserJet IID 7500 secondsLaserWriter Plus 832 secondsLaserWriter NTX 779 secondsTurbo 820 PS 773 seconds

5. Book-on-Demand publish one 200 page Ask the Guru volume…

LaserJet IID 102 minutesTurbo 820 PS 24 minutes

a serious marketing disadvantage –it psychologically seems slower thata non-duplex printer.

This happens because: (1) Eachoutput page takes twice as long toarrive since each counts double; (2)Page makeup times appear extra longsince the back side prints before thefront side does; (3) The pipelining youneed for the maximum mechanicalspeed only will run full blast whenprinting three or more sequentialpages; and (4) Extra time and effortcan be needed to clear a page re-maining in the switchback path.

In addition, a duplex printer alsoseems to eat toner cartridges twiceas fast. Again, this is because eachpage counts double.

My IID speed testing results areshown in figure two. When runningroutine real-world code that doesnot use the duplex feature, the IID is

slower than a LaserWriter Plus andannoyingly slower than the Laser-Writer NTX or a QMS PS-820.

Which is about what you wouldexpect when comparing a 12 Mhz68000 against a 20 Mhz 68020. Espec-ially when you allow for all of theinherent limitations of any cartridgebased PostScript solution.

Unfortunately, when you try torun a real-world duplex job, thisbeast slows down even further. Onereason for this is that the PostScriptcopypage operator doesn’t work in aside-sensitive manner. Thus, if youare custom addressing brochures,you cannot simply erase and rewriteeach new name. Instead, you musterase the entire back, the entire front,and redo each side of each pagefrom scratch.

On my brochures, this defectivecopypage feature creates a 10:1 slow-

down. And, yes, that is after youcarefully pseudocompile and thenoptimize fast code specifically forany IID use.

Another reason for the slowdownis that there is no shared SCSIcomm. Most users will buy theirduplex printer for high volume andhigh productivity.

Preferably largely unattended byeither a paid operator or a hostcomputer. For these needs, a harddisk and a high speed shared SCSIcomm are not luxuries. They areinstead absolutely essential.

There’s also some more minor IIDproblems. The liquid crystal displayon the IID is totally illegible underall known lighting conditions andall viewing angles. The remote resetonly works when it is not neededand blows up otherwise.

The resident error trapper seemspatently excessive. And, Canon hasattitude problems on $5 toner cart-ridge refilling. Returnable bitmapsare not obviously available. There’sno handles. Tray chaining is con-spicuously absent for no apparentreason. Parchment cover stock jamsfar too often.

In testing, I’ve found the IID tobe incredibly frustrating, comparedto the NTX or the Turbo 820. Thepoorly done serial comm, improperremote control, slow speed, errorhassles, and lack of SCSI all gang upto make their IID a maddingly in-furiating printer.

You can also blow up and hangthe IID font cache by throwing toomany fonts at it too fast. This withBook-on-Demand files which printjust fine on the NTX or 820.

The Processing Data message onthe LCD display goes on long afterthe machine has hung itself and isout playing in the tulips. Most IIDblowups are usually obvious onlyafter several infuriating hours goingby with no new output.

At this writing, though, the IIDseems the only mainstream duplexPostScript game in town. And thebenefits of double sided printing arevery impressive. Exasperating ornot, my own IID does run nearly 24hours a day. Sigh.

65.3

July, 1990

Fig. 3 – Two hard disk font reading utilities.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First% Street Thatcher, AZ. 85552. (602) 428-4073. All rights reserved.% Personal use permitted so long as this header remains present.% Write or call for our free PostScript insider secrets brochure.% Free PostScript helpline 8-5 weekdays, Mountain Standard Time.

% UTILITY #1 -- A HARD DISK FONT LISTER

% Lists fonts downloaded to a NTX or 820 hard disk back to host.

/scratchstring 30 string def/str (X) def

800 {37 sin pop} repeat % optional short delay

/filenameheader (%disk%fonts*) def % for Apple NTX old (1.0) ROM/filenameheader (%disk5%fonts*) def % for QMS PS-810 Device #5

filenameheader {scratchstring print flush 80 {37 sin pop} repeat(r) print flush 100 {37 sin pop} repeat

0 1 scratchstring length 1 sub {scratchstring exch 32 put} forpop} scratchstring filenameforall

quit

% UTILITY #2 -- A HARD DISK FONT READER

% Reads any file on a NTX or 820 hard disk and returns it to host.

2000 {37 sin pop} repeat % optional time delay

/strrx (X) def

/rdfilename (%disk5%fonts/Benguiat-Book) def % change this line

rdfilename (r) file /myworkfile exch def

{myworkfile read { strrx exch 0 exch put strrx printflush 5 {37 sin pop} repeat }{myworkfile closefile quit} ifelse} loopquit

The new LaserJet IIID should bearriving just around the time youread this. It should be very muchbetter than the IID, especially if Isucceeded in convincing Adobe thattheir copypage is fatally flawed forduplex use and have shown HP thatshared SCSI comm is absolutelyessential for any duplex printing atall. Stay tuned.

At this revision, the IID has beenreplaced by the IIID, which in turnhas been replaced by the IIISI. Andwe still are stuck with the originalwimpy PostScript version, and stillhave duplex copypage hassles, andstill have no hard disk or sharedSCSI comm.

How Do I Use PostScript MacFonts on Another Machine?Funny you should ask that. This

is one very popular topic on thehelpline. Genuine Adobe PostScriptprinter fonts are usually stored onthe Mac in a special format that isdownloaded over AppleTalk byusing the Adobe Font Downloader. Onthe older Apple machines or on anIBM, the same fonts are downloadedin the form of a standard ASCIItextfile, the start of which is inplaintext, and the remainder ofwhich is PostScript eexec encoded.

Fortunately, there are severalfairly simple methods that get be-tween the two formats, once youknow an insider secret or two.

Some of the early Adobe fontdownloaders flat out asked youwhether you wanted the Mac or thetextfile format. To use these, youjust select textfile and have at it.This feature was dropped on laterversions of this downloader.

The fastest and easiest methodrequires a NTX or a PS-820 and ahard disk. When downloading theMac font, just select disk and let thefont be written to the hard disk.

Note that all fonts written to harddisk are placed in a subdirectorycalled fonts. Thus, an Optima-Boldbecomes fonts/Optima-Bold. A harddisk catalog and disk read routine isshown in figure three. These let youreturn the actual font in its textfileform to any host for recording.

The second method works withany PostScript printer, but requiresa Mac application swift enough tolook around the Mac for fonts notalready downloaded. Just create ashort text file, and select your hostbased font. Then, while printing, doan option-F or an option-K to capturethe file to a disk. Finally, erase theportion of the short text file that isnot the downloaded font.

What happens here is that theneeded font first gets sent to theprinter, followed up by your textmessage. When saved to disk, youwill see a combination of a fonttextfile and your message to beprinted by that font. Erase a fewcharacters here, and all that remainsis the actual font, ready to transferto any other machine as a standardtextfile, using the AFT Apple File

Transfer or any comm scheme.A Mac-based font conversion

utility called #207 UNADOBE.SIT isavailable on GEnie PSRT. The down-loading charge is around twentycents, and you can get your voiceconnect info simply by dialing (800)638-9636.

Note that all the full top secretdetails of Adobe’s font files appear intheir black book, that is otherwiseknown as their Type I Font Formatbook. By one of those astoundinglyinsidious coincidences that seem toinfest this column, I just happen tohave a few of these on hand if youneed one.

How Can I InterfaceApple to H-P?

There’s a lot of misinformationkicking around over interfacing a

65.4

ASK THE GURU

Fig. 4 – How the Kroy Color process works.

Kroy Color inkand carrier

Toner original

Heat and pressure fusesink to re-melted toner

Kroy Color inkopaque negative

Ink coatedtoner original

traditional Apple IIc, IIe, or IIgscomputer to those Hewlett-PackardLaserjets, duplex or otherwise.

Contrary to popular belief, anyLaserJet works just fine with anyold Apple, once you resolve a fun-damental detail or two.

Because of some ancient historyinvolving a non-ASCII screen code,many Apple applications and mostearly Apple software output highASCII text, consisting of seven databits and a digital one.

The HP machines, instead insiston a full eight bit true ASCII word.Should you simply connect the twotogether, you’ll get some Swedish-looking results when using PCL andnothing at all under PostScript. Thishappens because you are outputtinghigh ASCII characters and trying tointerpret them as low ASCII.

The cure is simple. Just use sevendata bits, that extremely obscurespace (or zero) parity, and one stopbit at the Apple end.

On your Super Serial Card, usethe [I] 7 P software command. FromAppleWriter, use [O]-J 1 9600, 7, S, 1.Or otherwise guarantee that youroutput text stream consists of lowASCII characters.

Unlike Mac and IBM systems, aprinter driver is the responsibilityof each individual application onthe older Apple machines. Thus,

you have to access each softwarepackage you have and customize itfor the HP machines. This is easilyhandled in AppleWorks by using the Custom Printer feature.

To output any occasional highASCII character in PostScript, justuse the reverse slash technique aswas detailed in the red book. Forinstance, the \261 gives you an emdash, while the \267 produces abullet or large dot.

The simplest way to pick up aspace parity on a IIgs is to use aSuper Serial Card. This is also es-sential for proper AppleWriter use,especially when pseudocompiling.

Note also that there is an excellentPostScript Imagewriter emulator onthe IIgs system master disk underthe filename SYSTEM.MASTER/APPLETALK/IWEM. Which is astandard textfile that can be easilymoved over to Mac, IBM, or anyother platform. To invoke IWEM,use a _WBJ_ command string. Orelse rearrange all the scenery to suityourself.

Give me a call on the helpline ifyou need further assistance on anyof this.

Tell Me All AboutLow Cost Color

Yes, you can now go out and buyfull color PostScript printers. And,

PostScript level II now offers farmore in the way of special colorhalftone screens and powerful newcolor operators. But these remainhigh end solutions with high per-page copy costs that may not applyto you here and now.

What can you instead do simplyand cheaply to add color to yourroutine PostScript output?

You just might like to check outthe color copier abilities of yourlocal quick print shop. Since colortechnology is moving so fast, youmay be plesantly suprised by boththe cost and the quality.

The simplest and most obviousfirst step on your own is to usecolored papers. While the Paper Plusfolks are my overwhelming favoritehere, an outfit called Paper Directhas an interesting and refundable$15 kit of sample papers.

Yes, colored toners are available.Unfortunately, most users end updisappointed with both the priceand the performance of color tonercartridges. Three sources of colorlaser printer toner do include DonThompson, Lazer Products, and BlackLightning. Black Lightning also hasspecial sublimination color tonersfor T-shirt printing.

There’s a monumentally mismar-keted and obscenely overpricedprocess kicking around which isknown as Kroy Color or Omnicolor.This is simply a hot stamping foilconverted so it sticks to a carrier.Toner is nothing but a mixture ofblack stuff and hot glue. Reheat it incontact with a hot stamp material,and the glue melts and grabs thereal ink of the foil. Presto. Instantand impressive color.

This stuff works like a champ.Dozens of colors are available, withthose metallic foils giving the bestresults. There’s even a laminatingfilm for menus and book covers.

Figure four shows you thisprocess in detail.

Several sources for hot stampfoils do include Transfer Print Foils,Lamart, USE Foils, Hoechst, andMaple Roll Leaf. Yet others advertisein Paper, Film, and Foil Converter andin Converting magazines.

65.5

July, 1990

Fig. 5 – A PostScript Point Rule.

100 150 200 250500

POINT RULE

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street% Thatcher, AZ. 85552. (602) 428-4073. All commercial rights reserved.% Personal use permitted so long as this header remains present and intact.% Write or call for our free PostScript insider secrets brochure and our% product list Free PostScript helpline 8-5 weekdays, Mountain Standard Time.

% A point ruler handy for layout and design. It prints diagonal on the page so that% it fits on one sheet yet is full length…

-30 212 translate -125 rotate

/xstrt -776 def /vstrt 200 def /tick1 -6 def /pos xstrt def 436 {pos vstrt moveto 0 tick1rlineto /pos pos 2 add def 0.20 setlinewidth stroke} repeat % 2 tick

newpath /pos xstrt def /tick2 -12 def 88 {pos vstrt moveto 0 tick2 rlineto /pos pos 10add def 0.20 setlinewidth stroke} repeat % 10 tick

/pos xstrt def /tick3 -18 def 18 {pos vstrt moveto 0 tick3 rlineto /pos pos 50 add def0.20 setlinewidth stroke} repeat % 50 tick

% point numbers (5 spaces between each)newpath /Helvetica findfont [ 12 0 0 13 0 0 ] makefont setfont /vstrtvstrt 32 sub def /xstrt xstrt 12 sub def xstrt vstrt moveto -688 168 moveto1.66 0 (100 150 200 250 300 350 400 450 500 550600 650 700 750 800 850) ashow-734 168 moveto 1.66 0 (50) ashow -780 168 moveto (0) show -465 146 moveto/Helvetica findfont [40 0 0 15 0 0 ] makefont setfont (POINT RULE) show

% bottom linenewpath -776 135 moveto 870 0 rlineto 1 setlinewidth stroke

showpage quit

The Foiled Again newsletter fromTransfer Print is a must have.

Some of these materials do seemsuitable for direct toner use whilesome are not. The typical pricing inreasonable quantities is under onenickel a sheet, provided you do yourown conversion from bulk rolls.

One source for the ready-to-useKroy Color-like materials and fusionmachines is Lazer Products. A hands-on demo on Kroy Color is includedin my Intro to PostScript video.

You can also use tiny pieces ofKroy Color and either an iron or amodel airplane wing fixer. This is alow cost but labor intensive way ofsprucing up a letterhead.

Finally, I have run into a newprocess that can let you combinestunning full color with your ownlaser printing at sane prices. ThePhotolabel folks will take any colorphotograph and convert it into lotsof self-stick labels of various sizes,with pricing as low as twelve centseach. These labels are thin, unlikethe mess you get gluing ordinaryphotos onto a sheet of paper.

To use these photolabels, justlaser print your whatever onto acolored paper or cover stock, KroyColor the toner, and slap on a photo-label or two, and you have instantand custom full color. Beat out on abrick on your kitchen table.

Uses? Obviously house-for-saleor car-for-sale brochures. Custom orpersonalized calendars. The Photo-labels would appear ideal for anyfundraising projects that you wantto keep both under local control andfully customizable.

But, why don’t you just tell meinstead? For our contest this month,just show me any tricks you areusing towards any low cost color.There will be the usual IncredibleSecret Money Machine book prizes,with an all-expense-paid (FOBThatcher, AZ) tinaja quest for twogoing to the very best of all. Let’shear from you.

What is This Month’sPostScript Utility?

Believe it or not, this is Ask theGuru column #65. I thought we’d

rerun an "oldie but goodie" as ourPostScript utility this month. Just incase you don’t have column #27 orAsk the Guru I handy, figure fiveshows you a convenient PostScriptpoint rule.

While PostScript can use any unitof measurement you care to, mostpeople most of the time use an ap-proximation to a printer’s point of72 units per inch.

A point rule, of course, is yourforemost tool for layout or changes.The one I’ve shown you here printsdiagonally on the page. When youprint this on cover stock, cut it andlaminate it in plastic, this gives youthe full page length ruler withoutneeding to use extra long paper.Printing on a diagonal also averagesout the paper stretch, so your ruleshould end up fairly accurate whenused vertically or horizontally.

If you get a chance, run this point

rule on a Lino for your maximumsharpness. But the results are cer-tainly useful at 300 DPI.

Remember that most papers willstretch a percent or even more withhumidity and use. So don’t expectsuper accuracy over long distances,unless you print on a more stablematerial.

PostScript, of course, is ideal forcreating rules for just about anymeasurement task, particularly foroddball scales. The weirder thescale, the more likely you can createsome sort of specialty or customproduct out of it at low cost.

Weaver’s reed gauges would beone obvious example of this sort ofthing. There are lots more.

Most of the PostScript routinesyou see here and in my LaserWriterCorner column are now available onGEnie. Just use M835 as your topsecret access password. ❆

Don Lancaster’s

ASK THE GURUAugust, 1990

Papers and humidityGenerating histograms

More on duplex printingHP PostScript Cartridges

QMS Turbo PS820 review

66.1

Fig. 1 – My critique of the HP PostScript cartridge.

1. - Any PostScript cartridge solution is inherently wimpy and slow, whencompared against a RIP built from the ground up to speak interpretedPostScript as its native internal language.

2. - This simple code sequence causes a fatal blowup…

100 200 translate 5 dup scale10 {53 45 {0.12 0 360 arc stroke 0} setscreen} repeatshowpage quit

3. - The copypage operator is not side sensitive when duplex printing, causingsevere problems on the IID.

4. - The IID page makeready times are three to four times longer than thoseof the NTX or the PS820. Other machines are correspondingly slow. Thelack of a duplex copypage can cause another 10:1 or higher slowdown forcertain files on the IID, especially when used with autoaddressedbrochures.

5. - The serial comm is flakey and blows up when you need it most. Theexternal soft resets only seem to work when they are not needed.

6. - This cartridge can choke on more complex jobs that run just fine on theNTX or the 820, especially when the autojamrecovery is active.Undocumented error #24 is a fatal blowup. You’ll see lots of these.

7. - The apathforall operator is not implemented in the standard manner,making capture and recording of font paths extremely difficult.

8. - There is no apparent hard disk support, nor any provision for eithershared or direct SCSI comm.

Amonth has passed, and Ihave been continuing myin-house testing of that

Hewlett Packard IID duplex printer.As we saw in the last column, the

IID is inexcusably frustrating andannoyingly slow. It provides lousyserial comm, totally lacks absolutelyessential SCSI hard disk support, andhas a monumentally stupendous flawin that its PostScript copypage oper-ator is not side sensitive.

But none of this matters in theleast. I run this machine virtually 24hours a day, eagerly logging moretime on it than most of my otherprinters combined.

Why? Because their new duplexprinting process itself is that fan-tasmagorical.

Self-collating duplex or doublesided printing very dramatically

increases your throughput, yourproduct quality, and your overallproductivity. All the while sharplyreducing paper jams and slashingyour scrap rate. And the very fewjams and mixups that do remaintrash only a single quickly repairedpage, rather than destroying theback sides of an your Book-on-Demand published volume.

Employee morale on a duplexprinter is also ridiculously better.They actually fight to be able to usethe machine.

I did find some more ongoing IIDproblems, though, and sorely wishthis wasn’t the only game in town. Ifanything, that copypage problem isturning out much worse than I firstexpected. To do something simpleand mainstream like a pile of auto-addressed brochures, you have to

erase the entire back, the entire front,and then rebuild the entire back andfinally the entire front. At least a 10:1slowdown, even after compiling. Justto change to the next name and itsaddress. Really dumb.

Your choice of toner density andpapers gets crucial for successfulduplex work. Especially if largeblack areas exist on the backsides.Running a few blank pages throughyour machine the first thing in themorning is also a good idea.

It is super important to inspectthe bottom (orange) roller daily, byflipping down that seldom-usedgreen hatch at the extreme rear.This bottom roller must be keptspotlessly clean. Use a toner pickuprag or Q-tips after the fuser hascooled off. I also do suspect theentire fuser assembly should bereplaced or rebuilt every 35,000copies or so.

What do I really want? I want aduplex PostScript printer which willtotally unattended by either a personor a host computer reliably Book-on-Demand publish a large pile ofvolumes overnight, fully stacked,collated and ready for final binding.And I strongly suspect that meetingmy needs will meet those of a lot ofothers as well.

About all of those new low endPostScript printers. I was hoping tobe able to report on the Apple Per-sonal LaserWriter NT this month,but mine was DOA and I haven’tseen it since. Two conspicuousfeatures of this printer do includePostScript internal handling of IBMscreen fonts and greatly improvedenvelope options.

From here, it does look like theHewlett Packard LaserJet IIP with aPostScript cartridge produces thebest text image quality (owing to adot modulation technique), and thatthe QMS PS410 offers far and awaythe most features with the fastestoperation.

66.2

ASK THE GURU

Fig. 2 – A summary of the QMS Turbo PS820 laser printer.

The GOOD stuff–

The PS820 is far and away my favorite machine. Anything anunexpanded NTX can do, the PS820 can do faster and better. Thecurrent PostScript is version 51.7.

There are switchable and chainable dual paper trays; extra residentfonts; better mode switching; improved hard disk operation with simplercables and eight device addressability; Diablo (Daisywheel), PCL(LaserJet), and HPGL (Plotter) emulations; upgraded jam recovery; andmore comm options.

QMS has absolutely outstanding direct end user service and support.They are a smaller company that obviously cares about their customers.

The BAD stuff–

The PS820 speed is only marginally faster than the NTX, typically onlyfive percent or so. The memory supplied is only 2 Megabytes. Morewould certainly be useful. The hard disk system can be further improved.

The QMS "list" and "street" prices traditionally have been much closerthan with Apple. You have to shop around to get a great price.

The PS820 could be dramatically improved by providing a duplexprinting option, additional memory, and direct or shared SCSIcommunications.

I presently would rank the ApplePersonal LaserWriter NT being notacceptable, owing to Apple’s ongoingrefusal to provide end user repairmanuals or overnight VISA/800 re-placement parts like HP does.

It is not at all clear to me whyApple continues to force all of theirend users to buy HP manuals andHP parts to keep all of their Appleprinters alive. It must be some sortof a secret rebate policy.

Let’s see. Our great PostScriptRoundTable on GEnie has reallytaken off. As of this writing, we’vehad nearly 2000 library downloads,and Adobe has promised us strongfuture support.

GEnie recently reduced all theirrates and now have offered a greatlyimproved new Star service as well.There are no longer any penaltiesfor 2400 baud operation.

That new Red Book should be outby this time, including details onthe new Level II PostScript. Newstuff includes the FAX compaction,forms, filtering, better color, andmore precise halftones. I am nowstocking these for you. Write or callfor more info.

A reminder here that I do have afree desktop publishing insider’ssecrets brochure waiting for you ifyou call per the appendix.

How Good are ThosePostScript LaserJet Cartridges?

There are presently two genuineAdobe PostScript cartridges newlyavailable for the LaserJet series ofprinters. The older one is sold by HPas part #33439P and is intended foruse on the IID, IIP, and LaserJet III.The newer one is sold directly byAdobe and is intended specificallyfor the older LaserJet II models. Thestreet prices are approaching $300.

Together, these two will largelyeliminate any need for host basedPostScript solutions or for a thirdparty imitation PostScript clone.

Figure one summarizes some ofthe features of that HP cartridge.There are several problems, all ofwhich are more or less livable.

For openers, any cartridge basedPostScript solution has to be an in-

herently wimpy one, compared todesigning a RIP from the ground upto speak interpreted PostScript as itsnative language.

I’ve only found one fatal flaw todate, and this involves a curiousinteraction between their setscreenand arc operators. This is way out ofthe mainstream for most users. Fulldetails appear in our GEnie PSRTdownloads #144 and #148.

There does seem to be other timeswhen the undocumented PS ERROR#24 fatal blowup happens. Certaincomplex files that print properly onthe NTX or PS820 can blow up thecartridge, especially when the mem-ory hogging but extremely usefuljamrecovery feature is active.

As we saw last month, there is areally bad flaw in copypage in that itis not side sensitive. This is a realIID killer, but is of no consequenceon the IIP or the III.

I also found that the serial commblows up whenever you need it themost. Thus, your ability to do aremote reset is only available whenyou do not really need it. Sometimesthe serial comm will hang so badthat a total power down is the onlypossible recovery.

We did see some speed trials lastmonth. The HP cartridge on the IIDruns at 1/3rd to 1/4th the speed ofthe NTX or the PS820 when runningnormal jobs; for a duplex printingwhere a side sensitive copypage isneeded, the speed will drop by afurther factor of at least ten.

Naturally, a HP printer withoutPostScript is an outright joke, so oneof these two genuine Adobe sol-utions is essential.

While many sources for thesecartridges do appear right here inComputer Shopper, you’ll find othergood ones in the Computer Resellertrade journal. A stocking source isDon Thompson.

What do You Think of theQMS Turbo PS820?

I have also been testing the TurboPS820 from QMS. This is by far myoverwhelming favorite PostScriptlaser printer, and some of its betterand worse points are shown you infigure two.

In general, anything that theunexpanded Apple NTX does, the820 can do better and friendlier.There’s more resident fonts in someextra Helvetica variants. There are

66.3

August, 1990

Fig. 3 – A PostScript histogram or "popularity poll".

Total Access: 1488 Total live files: 132 Average Access: 11.2727

dual trays which can get used forletterhead-envelope, firstpage-copy,or simply chained together for morepaper capacity. The jam recovery isbetter. The mode switches are mucheasier to change. The hard disk isimproved and allows separate ad-dressing of eight devices.

Disk cables are less cumbersome,and the hard disk itself is optionallyself-terminating.

Besides those usual Diablo andLaserJet emulations, you also have aHPGL emulator for plotters.

Their genuine Adobe PostScriptused is version 51.7, compared to51.8 on the latest NTX upgrade.

Above all, the QMS product sup-port and their PostScript help isinfinitely better than Apple’s. QMSis a smaller company that caresabout their end users and worksdirectly with them. They are alsovery good at attention to detail andlistening carefully to what the finalbuyer really wants.

The negatives here are minor.While the PS-820 is probably the"best" PostScript laser printer of itsgeneration, it’s not a giant killer. Ithas only modest advantages overthe NTX. When you use both harddisks and the new 3.0 ROM upgradeon the NTX, the PS820 is typically

only five percent faster.Traditionally, the differences be-

tween QMS "street" and "list" priceshave been a bunch closer than withApple, so it takes some shopping topick up the PS820 at a really greatbargain price.

Now, if only we could bolt someduplexing stuff on the PS820 frame(the holes are already there!), usesome high speed SCSI comm andadd extra memory and HP’s dotmodulation, we would really havesomething.

The bottom line: The PS-820 is mymain machine for just about every-thing, including an overnight Book-on-Demand production of all myLaserWriter Secrets volumes.

A far more detailed review of thePS-820 appears as PSRT Library #150on GEnie.

Tell me all AboutPaper and Humidity

Things are usually rather dry outhere in the Arizona desert, exceptfor our late summer monsoons. Atthat time, our paper jamming andbinding problems skyrocket. Par-ticularly on the back side feeds onnon-duplex printers.

I’ve tried all sorts of schemes foruncurling paper, involving every-

thing from refrigerators, microwaveovens, heavy long term clamping,back-rolling, and even a hot tub.Finally, an old line printer told methe truth. The only way to uncurlpaper is to prevent it from curling inthe first place.

You’ll find the best laser printingwill take place between 25 and 45percent relative humidity. Note thatthese values are considerably lowerthan what a printshop will usuallyrecommend.

Humidity is normally measuredusing a thermometer-style deviceknown as a hygrometer. You can buyhigh quality hygrometers throughAbbeon-Cal or from Heathkit, whilesurprisingly low cost (Would youbelieve $3?) units are available fromthe Klockit folks. If you are at allserious about desktop publishing,you must have a hygrometer on thewall above your laser printer.

A second ploy is to use a fakemilk crate for your scrap paper. Aglance at this box will immediatelytell you how much trouble to ex-pect. At 30 percent humidity, thepages will all lie flat and neatlycollated. At 40 percent, there’ll besome disarray. At 50 percent, you’llsee noticeable curl starting.

Finally, at 60 percent or higher,you will start getting the Milk Cratefrom Hell effect, with the papers alldesperately clawing all over eachother to see who can get out first.

Your stock papers are best stored unopened and flat on steel shelving.Open papers that are to be storedfor a long time should be wellwrapped, preferably in a plastic orfilm shrink wrap.

Simple methods of controllinghumidity are to use fans, and tomake sure such things as clothesdryers, dishwashers, humidifiers,evaporative coolers, and any othermoisture sources are not adding tothe problem.

Most air conditioning also tendsto dehumidify; that is what thecondensate pump is all about.

In extreme cases, you may wantto add a real dehumidifier to yourwork area. These are available fromsuch sources as Grainger or Sears.

66.4

ASK THE GURU

Fig. 4 – Filtered (smoothed) histogram shows trends.

Seven file Gaussian average

Costs start at $200, and the smallerunits need ordinary 110 volt ac linepower. Access to a floor drain or agarden hose heading outside is of-ten required.

What is This Month’sPostScript Utility?

Please do not call PostScript apage description language. To do so isa gross and demeaning insult, androughly comparable to referring toUNIX as a checkbook balancer.

PostScript is one totally generalpurpose computer language that caneasily hold its own against anymodern contender. In fact, dirtyingotherwise clean sheets of paper is ahopelessly restrictive and a veryminor use of PostScript’s truly as-tounding capabilities.

For most people, your PostScriptcomputer is by far the most pow-erful and the most flexible one youown. Having the most availableuseful memory and far and awaythe cleanest architecture.

Unfortunately, some epsilon mi-nus has inadvertently and stupidlyslapped a "printer" label onto theoutside of your best computer.

Think of your Mac or your 386 asa second rate and rinky-dink dumbterminal that gets attached to your"real" computer. And then do asmuch of your work as you possiblycan directly in PostScript.

Our utility this month gives youan example of using PostScript asone general purpose computer lan-guage. What this utility does isaccept any ASCII word processor,data base, or spreadsheet report inany format from any host source,carefully extracts only the essentialinformation from that report, andthen presents the interpreted resultsin a new and powerful form.

Er, let’s get more specific.I’ve gotten into some histograms

lately. They are a fascinating subjectin themselves, and do have a widevariety of uses. As figure threeshows us, a histogram is a bargraphstyle popularity poll for some mem-bers of some group.

For instance, you just might berunning a video rental store, and

want to know how each particulartitle is doing, and or whether thatcross-genre Godzilla versus the NightNurses classic has peaked in its pop-ularity.

Or you might be publishing somePostScript halftone images andwant to make sure each availablegray shade does the best possiblejob, similar to the dodging and theburning of photo darkroom work.

But this particular histogramtakes a standard listing of our brandnew GEnie PSRT library and thenanalyzes its performance. This is anespecially powerful predictor of thefuture. This code also downrightaddictively can fulfill the innermostsecret dream of most authors – to beable to watch over the shoulder oftheir readers as they peruse yourmaterial.

Once you have a histogram, youmay want to filter it to extract otherinformation. Obviously, you couldcount up the total usage, the totalentries, and then divide the two toget the average performance.

Figure four shows a filter I’veused that "smooths out" the resultsinto a new histogram. The suddenjump in user access around down-load #65 happened because we ex-perimentally added user tutorials to

the existing mix of free fonts andPostScript utilities. Obviously, thefiltered histogram shows that thiswas a very good idea that producedalmost a 60 percent increase.

Which is what histograms are allabout – spotting new trends, thenanalyzing the past, and finally pre-dicting the future.

Yes, you could simply averageout your histogram results, much assome stock market people run a 10day and a 30 day moving average.But it seems to me that any nearneighbors should "count more" to-wards a smoothing than any distantrelatives. I chose to use a fancy filterhere that I call a seven file Gaussianweighted average. A digital signalprocessing person will immediatelyrecognize this as a low pass filter.

Say you have a string of values inthe middle of your original noisyhistogram. Call them p, q, r, s, t, u,and v in increasing left to rightorder.

The filter I am now using is…

s’ = (0.2p + 0.5q + 0.8r +1.0s + 0.8t + 0.5u + 0.2v)/4

Thus, your new value s’ is onefourth the sum of the old s, pluseight tenths of its immediate neigh-bors, half of its adjacent pair, and

66.5

August, 1990

Fig. 5 – PostScript utility to generate histograms.

% Copyright c 1990 by Don Lancaster and Synergetics, 3860 West First Street% Thatcher, AZ. 85552. (602) 428-4073. All commercial rights reserved.% A fully expanded and documented version appears as GEnie PSRT #147.

/quadpixel {transform 4 div round 4 mul itransform} def /setgrid {save /rubbersnap exch defquadpixel /size exch def quadpixel exch quadpixel exch translate size dup scale} def /drawlines {72300 div lw mul size div setlinewidth /hposs 0 def #hlines gs div 1 add cvi {hposs 0 moveto 0 #vlinesrlineto stroke /hposs hposs gs add def} repeat /vposs 0 def #vlines gs div 1 add cvi {0 vpossmoveto #hlines 0 rlineto stroke /vposs vposs gs add def} repeat} def

/showgrid{ seegrid {gsave /#vlines exch def /#hlines exch def 106 45 {pop pop 0} setscreen 0.9setgray /gs 1 def /lw 1 def drawlines fat5 {/gs 5 def /lw 3 def drawlines} if fatter10 {/gs 10 def /lw 5def drawlines} if grestore}if} def /fat5 true def /fatter10 true def /seegrid true def /line1 {0.06setlinewidth} def /mt {moveto} def

/vertblocks 25 def /horizblocks 30 def /blocksize 12 def /vertscale 0.5 def /horscale 0.2 def /xxpos125 def /yypos 100 def /yspacing 50 def /totalnums 1000 def /reporttohost true def /reportdelay2000 def 300 string /buffer exch def

/gottoend? {dup (%!!%) search {pop pop pop exit }{/str exch def validate grabvalue} ifelse } def/grabvalue {{str 60 7 getinterval cvi hsa exch aindex exch put /aindex aindex1 add def} if} def

/validate {pop str length 71 eq {true}{false} ifelse {str 5 get 32 eq str 60 get 32 eq and str 67 get 32eq and str 4 get dup 0 48 add ge exch 9 48 add le and and str 59 get dup 0 48 add ge exch 9 48add le and and str 66 get dup 0 48 add ge exch 9 48 add le and and}{false} ifelse} def

/generatehisto {save /snap exch def totalnums array /hsa exch def /aindex 0 def currentfile {dupbuffer readline {gottoend?} {exit} ifelse } loop pop pop hsa 0 aindex getinterval /hsa exch defprocesshsa snap restore } def

/processhsa {/sumtotal 0 hsa {add} forall def /avg sumtotal hsa length div def save /snap1 exch defxxpos yypos blocksize setgrid horizblocks vertblocks showgrid line1 01 hsa length 1 sub { /posnexch def posn1 add horscale mul 0 moveto 0 hsa dup length1 sub posn sub get vertscale mulrlineto stroke} for snap1 restore save /snap1 exch def xxpos yypos vertblocks blocksize mul addyspacing add blocksize setgrid horizblocks vertblocks showgrid line1 3 1 hsa length 4 sub {/posnexch def posn1 add horscale mul 0 moveto 0 hsa dup length -2 sub posn sub get .2 mul hsa duplength -1 sub posn sub get .5 mul add hsa dup length 0 sub posn sub get .8 mul add hsa duplength1 sub posn sub get 1 mul add hsa dup length 2 sub posn sub get .8 mul add hsa dup length 3sub posn sub get .5 mul add hsa dup length 4 sub posn sub get .2 mul add 4 div vertscale mulrlineto stroke} for snap1 restore} def

% //// demo - remove or alter before reuse. ////

generatehisto

150 PS820REV.TXT X SYNERGETICS 900830 26460 4 1 Desc: QMS Turbo PS820 Review148 HPCARTXX.PS X G.REISEL 900827 6300 4 4 Desc: Fatal HP Cartridge Blowup Demo

(continues for rest of listing; MUST exactly match download format)

2 LANDSKPE.PS X DANTECH 900630 1260 6 6 Desc: Landscape selector LS1 1 BACKWARD.FNT X SYNERGETICS 900628 1260 11 4 Desc: Reverse ffont LS1

%!!% % required markershowpage quit

two tenths of the next adjacent pair.The quarter comes about since .2 +.5 + .8 + 1 + .8 + .5 + .2 = 4.

This is just one of many possiblefilter functions. To filter, you decidewhat you want and then go for it.

At any rate, much of the neededhistogram code appears in figurefive, and you can get the wholething ready to run as GEnie PSRTlibrary download #146.

To use, you drop your raw reportinto the middle of the code. Apple-Writer’s WPL is absolutely ideal forthis sort of thing and does it all inthree keystrokes.

Then your original report getsscanned line by line. Each line nextgets qualified, making sure that itcontains needed data and otherwiserejects titles or other extraneousstuff. The qualification used in thisexample makes sure you have a 71character line, verifies spaces inlocations 5, 60, and 67; plus 0-9numerals in 4, 59, and 66.

This validation is good enoughthat you can simply throw the log ofyour entire GEnie session at it, and itwill automatically fish out all of thegood stuff for you.

But watch that your validation

does not do more than expected. Anearly version threw out authors ofmiddle European descent becausetheir names were too long!

Once validated, the data for eachdownload is extracted and placedinto one long array. This is done insuch a way that up to 65536 arrayvalues are allowed, compared to the510 element limit you might hit bybuilding up an array directly on thePostScript stack.

In this example, the data we wantis the number of download accessesmade for each particular file. All ofthe rest gets ignored.

The noisy histogram then getsplotted using the rubbergrid graph-ing techniques that we’ve looked atin past columns and in my Ask theGuru II reprints. The total response,the number of files, and an averageresponse then gets calculated anddisplayed.

A second plot then gets drawn,applying the Gaussian filter to thearray, and generating the smoothedresults. Rather than worry aboutfilter windowing problems at eachend, I just chomped them off.

PostScript variables let you adjustthose horizontal and vertical scalefactors, the histogram density, thenumber of blocks, and so on. Justrearrange all of the scenery to suityourself. Any way you like.

Finally, your array and the keycalculated values are returned toyour host for a possible recording.Alternately, they could go on harddisk. With fancier routines, this letsyou later see how your histogramchanges through time.

Do note that a two-way commchannel is required for this final logfeature. Naturally, you shouldNEVER use PostScript if you do nothave your two-way comm channelalive and active.

Most of those other PostScriptroutines you see here and in myLaserWriter Corner column are nowavailable on GEnie. Just use M835(roundtable) or M836 (the downloadlibrary) for your top secret accesspasswords. For email messages, youcan reach me via SYNERGETICS onthe M200 electronic mail page.❆

Don Lancaster’s

ASK THE GURUSeptember, 1990

PS Perspective letteringIId duplex printing bug

Apple’s new CD releasesLaserWriter repair manuals

Some telecomm adventures

67.1

Fig. 1 – Use these HP Manuals for Apple LaserWriter repairs.

HP MANUAL

02686-90920(CX Engine)

33449-90906(SX Engine)

33459-90906(SX Engine)

33471-90904(LX Engine)

HP PRINTER

LaserJet I

LaserJet IILaserJet III

LaserJet IIDLaserJet IIID

LaserJet IIP

APPLE PRINTER

LaserWriterLaserWriter Plus

LaserWriter NTLaserWriter NTX

– – – –

Personal LW NT

QMS PRINTER

PS800

PS810 & TurboPS820 & Turbo

– – – –

PS410

Apple Computer should bestrongly congratulated forstarting up their toll free

Customer Assistance number at (800)776-2333, and usable during normalbusiness hours. Here is where youare supposed to go after you get theusual runaround or misinformationfrom your local dealer.

User group ambassadors havereceived a new CD ROM #110 titledOctober 1990 Product Training. Deal-ers have gotten their new Referencesand Presentations 5.0 CD. And all thedevelopers have received their newNight of the Living Disk CD. Theseare all crammed full of info on allthe recent product intros, primarilyas Hypercard stacks. Contact yourlocal user group to borrow thesedisks. As usual, you can find yourlocal user group simply by calling(800) 538-9696.

Apple has newly announced arather strange Apple IIe plug-incard for the Mac LC. Curiously, thiswondrous beast accepts only the IIe(65C02 based) software and not IIgssoftware and runs only on the LC.The ad copy for the data sheet onthis one is ludicrously out of date.There’s a few hundred thousand IIeprograms available, not the mere10,000 claimed. GEnie alone stocks16,000 or so of them. But calling thistheir "world’s largest collection ofpersonal computer software" quiteobviously has not been true for arather long time.

I was both rudely surprised andutterly apalled that Apple Computerseems to be aggressively marketinga $9000 product which is inherentlydefective. I am referring to their oldLaserWriter Mailing List. The sampleI tested included nearly 20 percentoutright duplicates, combined withan unacceptably high level of typosand otherwise undeliverables.

Worse yet, the nixie rate on thislist now exceeds an intolerable 25percent. Most of these came back

with the dreaded Forwarding OrderExpired stamp, meaning that allthese names are ancient.

Oh, yes. The response rate to awell tested and targeted flyer wasalso totally negligible.

These dupe and nixie levels ex-ceed allowable industry standardsby a factor of ten or more, makingthis offering not only less than use-less, but a downright dangeroustime and dollar sink. Obviously,this list has never been cleaned andnever tested. Certainly, the usualindustry standard six month test re-mailings are not being done on anongoing basis. Not at all.

Avoid this turkey unless you canget written guarantees that Applehas cleaned up their act.

As of this Guru revision, veryserious problems remain with theApple lists. It seems that Applerefuses to believe how badly theirlist brokers are lying to them.

There are lots of new PostScriptbooks out. Adobe has issued theirRed Book II that includes full detailson PostScript Level II. Glen Reid hasreleased his brand new "gray" bookThinking in PostScript. And I haverecently expanded my LaserWriter

Secrets book/disk combo, which isan upgrade of the stuff you’ve beenreading in the LaserWriter Corner.Yes, I try to keep all three of these instock for you.

Where can I get aLaserWriter Repair Manual?Why, through Hewlett Packard, of

course. You certainly would notexpect Apple to actually sell you therepair and maintenance manuals forall their own products, would you?How silly can you get?

As we’ve seen a number of timesin the past, the Canon laser enginesused by HP, Apple, QMS and othersare pretty much the same animal forcomparable machines. All that dif-fers is the case arrangement and thescope and quality of all the supportelectronics provided. Thus, mostmechanical parts and their repairprocedures are identical betweenApple, QMS, and HP.

Figure one shows you the HPservice manual part numbers, theirtarget HP printers, and their nearestequivalent Apple and QMS printers.Manual costs are typically around$30 with overnight delivery by wayof VISA and an 800 number. Parts

67.2

ASK THE GURU

Fig. 2 – A PostScript duplex print quality tester.

% Copyright 1990 by Don Lancaster and Synergetics. 3860 West First Street,% Thatcher, AZ. (602) 428-4073. All commercial rights reserved. Personal use% permitted so long as this header remains present and intact. This file is% available on GEnie PSRT. PostScript secrets book+disk $29.50 VISA/MC.

% DUPLEX PRINTER PAPER AND TONER CONDITIONER AND TESTER

% Certain combinations of paper and toner may not print properly on a duplex% printer, even if the combinations work fine when straight-through printing.% This gets MUCH worse if the primary corona wire is the least bit dirty.

% The usual symptom is a blotchy, less dense, and occasionally "splattered"% second side. Note that the "REAR" prints first and "FRONT" second.

% If your second side sheet "gets better" by sitting out in the open with a% five minute half life, the problem is almost certainly a dirty corona wire.

% The apparent cause is the heating and calandering done to the paper during% the first side fusion. When combined with a dirty primary corona wire, the% electrostatics will change adversely.

% This tester simply ejects two totally black double-sided pages. It is normal% for the first printed side of the first page to not be uniform.

% On the SECOND page, IF the second side print quality is worse than the% first side print quality, try cleaning the corona wire with a Q-tip.

% turn on the duplexing if it is available

statusdict begin statusdict /setduplexmode known {true setduplexmode} if end

% draw a big black box

0 0 moveto 1000 0 rlineto 0 1000 rlineto -1000 0 rlineto closepath fill

% and show two double pages

copypage copypage copypage showpage quit

are also readily available, eitherindividually or as modules.

Uh, whoops. H-P just recentlyincreased all the prices of their man-uals to the $100 range. You knowhow it is when you suddenly startselling lots of something. You haveto raise prices to pay for the extrapeople in the shipping department,all of the new order takers, the extraannual reports, and so on.

Laser printers are actually fairlysimple devices. If you can changethe blade on a power lawn mower,you can easily perform 90 percent ofyour own LaserWriter maintenanceand repair work. Thus, it is almostessential that you have these man-uals on hand for any intelligent longterm use of your LaserWriter.

Other sources for LaserWriterrepair parts include Don Thompsonand the dozens of advertisers whoappear in Recharger magazine.

Does TelecommunicatingWork?

A good question. I have beenwondering that for a number ofyears. I live in a remote desert areawhere intrastate phone rates are

outrageously high and no local BBSaccess nodes are yet available. ButGEnie recently hired me as a sysopto try and put together the bestpossible PostScript BBS anywhereever. So, I have only very recentlygotten into telecommunicating in arather big way.

The potential of telecomm isawesome. Instant email commun-ications with anybody anywhere.Bypassing the post office and themessage delivery services. Rightnow solutions to those real worldproblems that manufacturers andsuppliers just as soon would notprovide you with. Direct contactwith end users worldwide with thesame interests as yours. Untoldzillions of free or low cost softwareprograms. Prompt answers to anyquestion on anything, asked at anytime from any place.

But the reality of telecomm todayis considerably less.

First, telecommunicating can beexpensive. The only bigger surprisethan your first $768.43 BBS phonebill is the $7,684.30 one your eighthgrade son or daughter just rackedup. Obvious cures are faster comm

rates, more intelligent software, athorough knowledge of who youare calling, and doing as much asyou can off line.

Many BBS services offer somescheme for automated late nightdelivery that uses a script to checkfor all your mail, pick up selecteddownloads, read chosen messages,and so on. This can get done fullyunattended and can be much fasterand far cheaper than "being there."The Aladdin feature of GEnie is atypical example.

Second, telecomm can be klutzy.Many systems are still in the darkages with limited text only formats.Some remain on klunky mainframeswhich slow down infuriatingly withadded customers. Others providemaddingly slow delays when theychange modes. There’s too manybusy signals far too often. Sorelyneeded are totally global searchesand "You are here" functions.

Third, telecomm is very diffuse.You sure have to wade through a lotof garbage to get at those goodies.Such things as bulletin board mes-sages are inherently inefficient formany uses much of the time.

Fourth, telecomm can lack deviceindependence. Far too many filesare available only in one particularformat for one specific host.

Fifth, compaction is now a zoo.A compaction obviously will let youupload and download faster andneed less BBS stroage. But there aredozens of incompatible formats,such as .ZIP, .SIT etc. Instead, youractual compaction used inside theBBS should be invisible to you, andall files should be available in atotally uncompacted form, alongwith your choice of any populardownload compaction scheme, pre-selected on a global basis. No com-paction should ever get uniquelylinked to any particular downloador any specific host.

This becomes an especially severeproblem with PostScript fonts thatare themselves device independent.

Sixth, and finally, there’s somereally strange denizens inhabitingbulletin boards. Especially anytimeafter 3 AM. A lot of these seem to

67.3

September, 1990

Fig. 3 – A demo of my fast perspective lettering routines.

prefer smoke to light, and many ofthem do have extremely short fusesand do seem to take umbrage overeverything. I have yet to figure outhow to deal with this.

There are many tens of thousandsof BBS systems alive today. Manyare reviewed right here in ComputerShopper. The biggies have most ofthe marbles though, since they oftenprovide toll free local service nodes,and easily can command the highestquality uploads.

In fact, a BBS that charges but hasfree nationwide local access linescan end up considerably cheaperthan a "free" BBS that does not.

Let’s look at four wildly differentexamples for on-line service tele-comm you might find of interest.

The first of these is The Well, theelectronic arm of the Whole EarthReview. This one is heavy into newage stuff, alternate energy, homepower, artisans working alone oron through that loosely knit "briar-patch" network, the environmentalissues, and lots of those "small isbeautiful" counterculture topics.

USENET is an international net-work that’s usually available onlythrough universities. Another namefor it is Anarchy 101. This is far andaway the greatest pirate cove any-where in the known universe.

The time from when someonedecides to keep something a secretto when a decrypted (and vastlyimproved!) explanation appears onUSENET normally gets measured innanoseconds. In several cases, theresponse time clearly has exceededthe speed of light.

My own favorite BBS is the DialogInformation Service. It costs $130 perhour, and is the only service that Igladly and willingly pay for. Withcare, Dialog can be your most out-standing telecomm bargain.

Naturally, it is not what you pay,but what you get. Dialog gives youinstant world-wide research on anyscholarly topic. One tiny and almostnegligible corner of Dialog is calledINSPEC, and provides only a paltrytwenty million on-line references in-volving computers, electronics, andphysical sciences.

Ferinstance, those of you who arefollowing all my Hardware Hackerrantings over in Radio Electronics doknow that we are heavily looking atmagnetic refrigeration, a new coolingmethod that can be fifty times moreefficient than freon.

From my just suspecting thatsomething was up and the words"magnetic refrigeration" to havingabstracts of the very latest eighteenworldwide key papers in the fieldcost $27 and took around twelveminutes. Done from a sand dune inthe middle of the Upper Sonorandesert. Convenient, even.

Finally, GEnie is one large infor-mation utility widely regarded ashaving the best downloads and thebest sysops (with one or two ob-vious exceptions) in the industry.Over 100,000 downloadable files areavailable within their hundreds ofsoftware libraries.

There are two sides to GEnie. The"free" or Star Services side costs you$4.95 per month and can give youunlimited and untimed access foremail, stock quotes, movie reviews,hobby roundtables, and such.

The "computing" side gives you

access to the software libraries andother higher value information at abaud rate independent $6 per hour.

There are bunches of computerand special interest boards. Anytypical roundtable will feature anextensive public domain or share-ware download library (The MACboard has around 25,000 files), aquestion-and-answer BBS havinghundreds of replies in dozens ofseparately accessible topics, andreal time conferences with namebrand biggies in the field.

My own tiny corner of GEnie iscalled PSRT, short for the PostScriptRoundtable found on page 835. Comevisit sometime. Besides PostScriptand desktop stuff, we’re now alsoheavily into the hardware hacking,midnight engineering, meowwrrrpfftting, and tinaja questing.

So, What is Better?Well, since you asked, how about

this heresy… Contrary to popularbelief, the US post office is far fasterand ridiculously cheaper than tele-communicating by email.

That’s right. A CD ROM mailedonce a month has an effective baud

67.4

ASK THE GURU

Fig. 4 – PostScript fast perspective lettering sampler.

% Copyright 1990 by Don Lancaster and Synergetics. 3860 West First Street,% Thatcher, AZ. (602) 428-4073. All commercial rights reserved. Personal use% permitted so long as this header remains both present and intact.% PostScript secrets book+disk combo available for $29.50 VISA/MC.

% The complete and commented set of perspective drawing utilities appears as% GEnie PSRT #172 PERSPEC.PS. GEnie connect voice info at (800) 638-9636.% Single printed copies available free from Synergetics at (602) 428-4073.

200 dict /perspectivedict exch def perspectivedict begin

/psave {/zh zz def /yh yy def /xh xx def} def /pm {px psave moveto} def /px {/zz exch def /yyexch def /xx exch def yo dup yy add div dup xx xo sub mul exch zz zo sub mul} def /prm {/ziexch def /yi exch def /xi exch def objrot cos xi mul objrot sin yi mul sub xh add objrot sin ximul objrot cos yi mul add yh add zi zh add px moveto psave} def /prmtostack {/zi exch def /yiexch def /xi exch def objrot cos xi mul objrot sin yi mul sub xh add objrot sin xi mul objrot cosyi mul add yh add zi zh add px} def

/xzshow {/msg exch def /zoffset exch def /xoffset exch def /mt {exch fontsize 0 get mul .001mul xoffset add exch fontsize 3 get mul .001 mul zoffset add 0 exch prmtostack moveto} def/li {exch fontsize 0 get mul .001 mul xoffset add exch fontsize 3 get mul .001 mul zoffset add0 exch prmtostack lineto} def /ct {3 {6 2 roll exch fontsize 0 get mul .001 mul xoffset add exchfontsize 3 get mul .001 mul zoffset add 0 exch prmtostack} repeat curveto} def /cp{closepath} def /strrx ( ) def msg {strrx exch 0 exch put strrx dup ( ) eq {pop (space) } if cvnmychardict exch get exec exec charproc fontsize 0 get mul .001 mul extrakern add xoffsetadd /xoffset exch def} forall} def

/mychardict 100 dict def mychardict dup

/N {740 {76 0 mt 150 0 li 150 650 li 590 0 li 664 0 li 664 739 li 590 739 li 590 126 li 176 739 li76 739 li cp}} put dup

/a {683 {620 547 mt 549 547 li 549 443 li 508 521 421 559 335 559 ct 259 559 182 532 99443 ct 79 425 42 350 42 277 ct 42 194 76 125 96 103 ct 166 23 255 -13 337 -13 ct 423 -13507 26 549 103 ct 549 0 li 620 0 li cp 335 488 mt 457 488 549 391 549 270 ct 549 156 45158 337 58 ct 220 58 116 151 116 271 ct 116 392 215 488 335 488 ct cp}} put dup

/v{554{238 0 mt 315 0 li 546 547 li 466 547 li 277 94 li 88 547 li 8 547 li cp}}put dup

/i {200 16 add {63 8 add 0 mt 137 16 add 0 li 137 16 add 547 10 sub li 63 547 10 sub li cp 63613 mt 137 16 add 613 li 137 16 add 739 li 63 739 li cp}} put dup

/C {813 {767 549 mt 747 603 686 659 639 689 ct 576 731 501 751 426 751 ct 216 751 44582 44 372 ct 44 154 215 -13 432 -13 ct 571 -13 706 70 770 193 ct 688 193 li 630 112 53258 432 58 ct 264 58 118 199 118 372 ct 118 534 259 680 427 680 ct 526 680 630 633 685549 ct cp}} put dup

/u {608 {545 547 mt 471 547 li 471 258 li 471 211 466 164 438 125 ct 406 82 357 58 304 58ct 244 58 191 85 161 137 ct 139 174 137 216 137 258 ct 137 547 li 63 547 li 63 258 li 63 18669 120 102 85 ct 164 12 224 -13 294 -13 ct 370 -13 439 15 475 85 ct 475 0 li 545 0 li cp}} putdup

/b {682 {63 0 mt 133 0 li 133 94 li 176 23 272 -13 351 -13 ct 431 -13 499 8 575 94 ct 605 127640 197 640 276 ct 640 438 503 559 344 559 ct 263 559 173 521 137 445 ct 137 739 li 63739 li cp 346 488 mt 468 488 566 398 566 274 ct 566 155 470 58 351 58 ct 231 58 132 147132 269 ct 132 329 147 379 190 422 ct 231 464 287 488 346 488 ct cp}} put dup

/e {650 {611 247 mt 609 326 598 390 547 453 ct 492 520 413 559 327 559 ct 168 559 42432 42 273 ct 42 113 169 -13 329 -13 ct 445 -13 557 68 595 178 ct 518 178 li 485 103 40358 322 58 ct 221 58 120 143 116 247 ct cp 116 314 mt 134 415 225 488 328 488 ct 429 488518 411 537 314 ct cp}} put pop end

% //// demo - remove or alter before reuse. ////

perspectivedict begin 200 dict /mynewdict exch def mynewdict begin -220 100 translate /xo200 def /yo 800 def /zo 500 def /objrot 45 def /extrakern 1 def/charproc {fill} def /fontsize [120 0 0 120 0 0] def

530 600 translate 0 50 0 pm 22 25 (NaviCube) xzshow showpage end quit

rate of around 1600 or so. Thus, yourtypical modem would have to getrun continuously for an entire monthjust to try and keep up. At $6 perhour, it would cost you $4320.00 forwhat the post office will gladly dofor under a buck. Delivered 27 or sodays faster.

So why not bundle up everything

that goes on for the month on a BBSand then offer it as a single CD ROMdisk? Anyone who wants anythinggets everything. In a form that is fareasier to search and work with.

Which leads us to yet anotherheresy. Traditionally, informationhas always been sold at the fullmanufacturer’s list price, or more

often, vastly above retail. Especiallywhenever you factor in such olderthings as ad costs and door-to-doorencyclopedia salespeople.

Also in the past, information hasbeen fairly expensive to duplicateand copy. Especially to an identicalappearance and quality.

With CD-ROM, you now have in-formation that has separate "retail,""street," "wholesale," and "bulk"prices. The bulk pricing even has aname – it’s now called shovelware. Inshort, information is becoming acommodity. The traditional pricingstructure is certain to dramaticallychange. Radically.

On one hand, original authorsshould now theoretically be able toreceive a much larger share of thepie. On the other, the pie itself willbe much smaller and will sit on arack with a zillion others. Do youhave any further thoughts on this?

One of my longer term goalsaround here is to put all my earlybooks and articles onto CD ROMand combining it into an attractiveBook-on-Demand end user kit.

Any Duplex Quality Bugs?A really big one, that turned out

very difficult to pin down but ul-timately easy to cure.

As we have seen, duplex laserprinters are absurdly better thanequivalent non-duplex ones becauseof their tremendous improvementsin productivity, scrap rates, and theoutstanding employee morale thatthey can create.

I started getting some severeprint quality problems with myHewlett Packard IID duplex Post-Script laser printer recently. Themore I looked into it, the worse theproblem got.

The symptom is that the first sideprints fine, while the second side isgray, splotchy, and even mottled.Sometimes it even looks like yourandomly sprinkled some water onthe second side.

Here’s where we seemed to be at:It appeared that certain combina-tions of cartridges, papers, densitysettings, and toner sometimes maynot perform properly when duplex

67.5

September, 1990

printing. Even though these very samecombinations will work just fine whendouble pass printing!

Something about the paper tem-porarily changes as the first side isprinted. Specifically, at your fusionrollers, the paper can get squashed,heated, calandered, dehumidified,and electrically discharged. Whichapparently causes enough surfacechanges that the second side will getprinted under totally different localconditions than the first one.

Curiously, letting your paper sitout in the open for a few minuteswill "reset" the problem and allownormal printing. But just waiting intheir covered switchback channeldoes not seem to matter.

Yes, I did try changing the fusionassemblies, toners, settings, andpapers. But the solution turned outto be absurdly simple: A dirty pri-mary corona wire in a duplex printerwill foul up your second side printingridiculously earlier than it will foul upthe first side!

Apparently the reason for this hasto do with the electrostatics that areinvolved in charging up the newlymodified paper surface.

The cure is obvious: Clean yourprimary corona wire in the machineitself with a Q-tip every time youreload your cartridges. Be carefulwhen you do this, since the wire israther fragile.

Figure two is a short PostScriptroutine that lets you condition andtest your duplex printer. All it doesis print up two double sided blacksheets. As with any printer, the firstsheet conditions the drum by doinga blackflashing. A partial dark grayon this is normal and expected.

But your second sheet should beequally black on both sides. If it isnot, you have a problem. In general,this test will appear much worsethan your needed printouts, sincelarger black areas are the ones mostaffected by this problem.

What is This Month’sPostScript Utility?

I thought we’d look at some newhigher speed perspective letteringand drawing utilities.

In the past, high speed PostScriptperspective lettering was rathertricky, owing to those locked andencrypted font paths and the factthat a non-linear transformation isneeded to handle all the resultingtrapezodial letter shapes.

In recent Ask the Guru columns,we’ve looked at directly capturingfont paths and then using nonlineartransforms to rapidly distort yourletters into virtually any shape. Thisnew technique is much faster thanthe glacial and klunky pixel line re-mapping routine we originally wereforced to use.

I have recently upgraded my oldperspective utilities so they nowinclude high speed and easy-to-uselettering in any font, new layoutgrids, directional repeats, and flat-to-surface perspective mapping. Atypical example is shown in figurethree, while I have excerpted someof the key lettering routines for youin figure four.

The really neat thing about theseutilities is that you can use a plainold word processor on any old com-puter and a 2K textfile to completelyblow away most fancy illustrationor CAD/CAM programs. Especiallywhen it comes to fancy lettering,zillions of fully detailed bricks orshingles all shown correctly in trueperspective, or for ultra-compactfiles that print fast.

There are two steps involved indoing perspective lettering. First,the paths for all the letters in yourmessage in the chosen font must becaptured 1000 points high into adictionary known as -mychardict- or else linked to it. Each font characterconsists of a width value followedby a proc that describes your fontshape as a collection of mt (moveto),li (lineto), ct (curveto), and the cp(closepath) operators. Note that onlythese operators are permitted, as"caught" by a font path grabber.

Secondly, the message string youwant to print is sent to one of threeprocs called xzshow, yzshow, andxyshow, depending on which side ofthe arbitrarily rotated current objectyou are working on.

These operators do behave some-

what like the show operator. Exceptthat they do the needed nonlineartransformations, now have optionalpredefined kerning, and let you doanything you want with your finalfont paths. The key to this entireoperation is that each x and y pointinvolved in each and every moveto,lineto, or curveto gets transformed toa new x’ or y’ to appear correctlyinto your final perspective space.

Thus each and every end of eachand every subpath in the characteris correctly positioned in your finalperspective space.

The routines also now support aprintproc operator which lets youstroke, fill, or outline your font. Ordo any of those multiple strokingtricks you’ll find over in the Laser-Writer Corner free fonts. A fontsizeoperator lets you change the heightand width independently and stilluse a single path grab. While thisuses a [X 0 0 Y 0 0] font array, you’reonly allowed to change X or Y.

These routines can be extendedfor center or right justification. Andwe’ll be seeing lots more on Post-Script nonlinear transformations infuture columns.

A complete set of the perspectiveutilities appears ready to run onGEnie PSRT library as download#169 PERSPEC.PS, while several fontpath grabbers are currently beingdeveloped. You can also write orcall me for a free printed listing ofeither of these.

Fortunately, PostScript Level IImakes font grabbing a simple andautomatic process. All font pathsare now unlocked and unprotected!We’ll be having bunches more onthis as soon as we can.

A reminder here that we also nowhave a brand new set of LaserWriterCorner reprints that I do call DonLancaster’s LaserWriter Secrets andseperately available. Here you’llfind lots of free fonts, insider tricks,unique publications and unusualsources of supplies. Most of thecontents can get used with anyPostScript laser printer, not just aLaserWriter. And a ready-to-runcompanion disk is included in yourchoice of formats.❆

Don Lancaster’s

ASK THE GURUOctober, 1990

A new PostScript wish listUsing the Adobe DistilleryDouble distilled compiling

Graphics on a Bezier surfaceMeals-in-minutes packaging

68.1

Fig. 1 – My PostScript wish list.

1. PLATFORM INDEPENDENT DISPLAY POSTSCRIPT.

Reason: To eliminate the ludicrous transformations needed foron-screen displays. To speed up editing and debugging.

2. EXPLICIT SUPPORT OF SHARED SCSI COMM.

Reason: Most of today’s PostScript printing is severly baud ratelimited. Shared SCSI comm provides as much as a 50:1 speedup.

3. FONT LOCK PERMANENTLY REMOVED FROM PATHFORALL.

Reason: Instantly available font paths greatly simplify and ridiculouslyspeed up the nonlinear transformations needed for perspective,starwars, banner, flag, and similar creative display typography.

4. A READABLE AND RECORDABLE FRAMEDEVICE.

Reason: Dramatic speedups of most step-and-repeat routines.Greatly simplified book-on-demand publishing, especially whencombined with CD-ROM. Incredibly powerful editing andpost-processing possibilities.

5. CEXEC OPERATOR DOCUMENTED IN DETAIL.

Reason: To level the playing field and give all end users the samepower tools that only a favored few have today.

6. A VIDEO FRAMEDEVICE OUTPUT

Reason: Fast and useful debug tool, especially when speeding upcode. Also opens up alternate applications such as printed circuitproduction, CAD/CAM, Santa Claus machines, sign routers, and vinylcutters.

7. SYSTEM MONITOR AVAILABLE TO ALL

Reason: To allow rapid end user correction of problems such as thefatal copypage flaw in the duplex mode.

8. A FULLY OPEN FONT CACHE ARCHITECTURE

Reason: By allowing the cacheing of anything of any size, instead ofjust small typography, such things as multiple logos and othercalculation intensive routines could end up running much faster.

9. FULL SCSI HARD DISK DOCUMENTATION

Reason: Host interaction with the actual on-disk font cache allowsmany speedup and post-processing opportunities.

Rumor has it that the highlytouted Apple IIe card forthe Mac LC is incapable of

running AppleWriter! Especially inits modem record mode essential foruseful PostScript work.

I’ll try and work up some sort of afix on this, so stay tuned.

Let’s see. Apple has now quietlydropped the Apple IIc Plus and itsrelated printers. The end of an era,for sure.

Apple does have some interestingnew publications out. They have anew Apple II Guide and the revisedMacintosh Development Tools andLanguages Guidebook. And for thoseof you interested in disabilities, thehandicapped, or special education,there’s a revised Connections Guide:Computer Resources for the Disabled.There is also a new Apple ComputerResources for Special Education andRehabilitation.

Contact your dealer or local usergroup for info on the first three. Thefinal book is available through DLMTeaching Resources for $19.95.

The 3-M folks have now come upwith Post-It notes in a precut andlaser printable sheet form. Product#7709. Availability does still seemlimited at this writing. The obvioususes include custom notepads, bothpersonal and for resale.

Two great PostScript books nowinclude that gray book from GlenReid, otherwise known as Thinkingin PostScript, and the beige bookauthored by Ross Smith, and titledPostScript – A Visual Approach. I dotry and stock all of the very bestPostScript books for you. Write orcall for a complete list.

A reminder here that we now dohave this great PSRT RoundTableup on GEnie with lots of PostScriptand all the other Ask the Guru andLaserWriter Corner stuff on it. Andincluding lots of fully debuggedand ready-for-use downloads ofmost of the printed routines you seehere and in our earlier reprints.

You can voice call (800) 638-9636for connect info. I have also now puttogether a PSRT sampler disk foryou. Call or write me per the endtrailer for details.

What Do You Really WantFrom PostScript?

Did you know that all of thoseLaserWriter printers have a built-insystem monitor that lets you view

68.2

ASK THE GURU

Fig. 2 – Example of Distillery Compiled PostScript.

/bdef { bind def } bind def/ldef { load def } bind def/selectfont { exch findfont exch scalefont setfont } bdef/DF { selectfont currentfont def } bdef/BEGINPAGE { pop /pagesave save def } bdef/ENDPAGE { pop pagesave restore showpage } def/AW { moveto awidthshow } bdef/F /setfont ldef

1 BEGINPAGE/F1 /Palatino-Bold 10 DF -0.6 0 32 0.1 0 (Compiled PostScript?) 128.73 720 AW/F2 /Palatino-Roman 9.5 DF0.65 0 32 0.1 0 (Sort of. And certainly usefully.) 110 695 AWF2 F 1.9 0 32 0.108918 0 (You’ll find two main methods of ) 110 682.5 AWF2 F 0.00576103 0 32 0.1 0 (dealing with any computer language.) 100 670 AWF2 F 1.9 0 32 0.282986 0 (If the language is ) 100 657.5 AW/F3 /Palatino-Italic 9.5 DF 1.9 0 32 0.282986 0 (interpreted) 187.447 657.5 AWF2 F 1.9 0 32 0.282986 0 (, each ) 232.788 657.5 AWF2 F 0.855241 0 32 0.1 0 (instruction gets used when and as it ) 100 645 AWF2 F 0.634014 0 32 0.1 0 (occurs at the highest level. If the lan- ) 100 632.5 AWF2 F 0.222581 0 32 0.1 0 (guage is ) 100 620 AWF3 F 0.222581 0 32 0.1 0 (compiled) 138.481 620 AWF2 F 0.222581 0 32 0.1 0 (, a special process is ) 173.234 620 AWF2 F 1.54727 0 32 0.1 0 (gone through to make the final run ) 100 607.5 AWF2 F 0.33065 0 32 0.1 0 (time code be as compact, as fast, and ) 100 595 AWF2 F 0.65 0 32 0.1 0 (as efficient as possible.) 100 582.5 AWF2 F 1.10939 0 32 0.1 0 (Compiling also "divorces" the run ) 110 570 AWF2 F 0.459408 0 32 0.1 0 (time code far away from the original ) 100 557.5 AWF2 F 1.74072 0 32 0.1 0 (applications package that generated ) 100 545 AWF2 F 1.62958 0 32 0.1 0 (that code. Which can get handy for ) 100 532.5 AWF2 F -0.158258 0 32 0.1 0 (such things as providing fully device-) 100 520 AWF2 F 1.48734 0 32 0.1 0 (independent printed circuit artwork ) 100 507.5 AWF2 F 0.397416 0 32 0.1 0 (on ) 100 495.0 AW/F4 /Palatino-Roman 9 DF 0.397416 0 32 0.1 0 (BBS) 113.788 495.0 AWF2 F 0.397416 0 32 0.1 0 ( systems without needing any ) 129.811 495.0 AWF2 F 0.65 0 32 0.1 0 (applications package support.) 100 482.5 AWF2 F 0.65 0 32 0.1 0 ( ) 110 470 AW1 ENDPAGE

% Total non-header length: 1808 bytes% Typical baud rate limited run time: 1064 milliseconds on QMS Turbo PS820% Raw PostScript run time: 150 milliseconds on QMS Turbo PS820

memory, add or alter any portionsof the internal code, and change orrepair any or all routines? All youdo is jumper two secret connectionsin the serial cable to activate yourmonitor. A set of predeterminedbytes in your ROM chips will thenpreselect the "privilege" level ofaccess you are granted.

This is one example of the manysecret features of the PostScriptlanguage which you end users areprohibited from using. At one timelong ago and far away, some of therestrictions may have made slightsense to somebody, somehow. Butall they do today is grievously slowdown, incapacitate, and very muchinfuriate the end user.

Figure one is a list of some of themore crucial intentionally cripplingrestrictions forced upon all of youPostScript end users. I like to callthis my wish list.

Note that most insiders alreadyhave access to some or all of thesefeatures. Many could be found bynosing around the larger universityrelated BBS systems. The others byrounding up all the usual suspects.Thus, there appears to be a ratheruneven playing field. And a veryfoggy one as well.

Note also that no new technologyis needed here. A few simple wordson an interoffice memo or two caninstantly provide everything theentire wish list asks for.

And one of the big side effects offulfilling my wish list would be tomake PostScript so powerful to allthe end users that it would becometotally unassailable by any clone orcompeting technology.

Word has it that the upcomingPostScript Level II should haveunlocked font paths. Which wouldbe one major step in the right di-rection. One down, nine to go.

Sigh.

Compiled PostScript?Sort of. And certainly usefully.You’ll find two main methods of

handling most any computer lan-guage. If the language is interpreted,each instruction gets used when andas it occurs at the highest level. If

your language gets compiled, somespecial process is gone through tomake the final run time code be ascompact, fast, and as efficient as isreasonably possible.

Compiling also divorces the runtime code far away from the originalapplications package that generatedthat code. Which can get handy forsuch things as providing fully de-vice independent printed circuit arton BBS systems without the need forany applications support.

This can solve a crucial problemof both the hardware hackers andall their technical editors. Usingpseudo-compiled PostScript in itsEPS format to directly provide theend-users accurate and first qualityprinted circuit layouts, dialplates,templates, whatever.

Repeated use of compiled codeoften could run much faster than

interpreted code at the triple costsof all your time required for yourcompiling process, deferred errormessages, and moderately longerprogram files.

Compiled code is also quite hardto edit or change. To the point thatyou’ll nearly always edit and thencompile and rarely vice versa. This,of course, is true of just about anycompiling. Not just PostScript.

PostScript is an interpreted lan-guage. While a true compiling ofyour PostScript output down to themachine language level is not yetreadily available, there are severaltricks you can attempt to pseudo-compile your PostScript code.

The results can be an incrediblespeedup. For instance, we routinelymake up a three column and 6000character page with two figures, aheader and footer in three seconds

68.3

October, 1990

Fig. 3 – Example of Double Distilled Compiled PostScript.

/F {exch findfont exch scalefont setfont} bind def/A {moveto 0 exch 0 32 5 2 roll awidthshow} bind def

/Palatino-Bold 10 F -0.6 .1(Compiled PostScript?)128.7 720 A

/Palatino-Roman 9.5 F .65 .1(Sort of. And certainly usefully.)110 695 A 1.9 .1089(You’ll find two main methods of)110 682.5 A .005761 .1(dealing with any computer language.)100 670 A 1.9 .2830(If the language is)100 657.5 A 1.9 .2830(, each)232.8 657.5 A .8552 .1(instruction gets used when and as it)100 645 A .6340 .1(occurs at the highest level. If the lan-)100 632.5 A .2226 .1(guage is)100 620 A .2226 .1(, a special process is)173.2 620 A 1.547 .1(gone through to make the final run)100 607.5 A .3307 .1(time code be as compact, as fast, and)100 595 A .65 .1(as efficient as possible.)100 582.5 A 1.109 .1(Compiling also "divorces" the run)110 570 A .4594 .1(time code far away from the original)100 557.5 A 1.74072 .1(applications package that generated)100 545 A 1.630 .1(that code. Which can get handy for)100 532.5 A -.1583 .1(such things as providing fully device-)100 520 A 1.487 .1(independent printed circuit artwork)100 507.5 A .3974 .1(on)100 495.0 A .3974 .1( systems without needing any)129.8 495.0 A .65 .1(applications package support.)100 482.5 A

/Palatino-Italic 9.5 F 1.9 0.2830 (interpreted)187.4 657.5 A 0.2226 .1 (compiled)138.5 620 A

/Palatino-Roman 9 F .3974 .1 (BBS)113.9 495.0 A

showpage

% Total non-header length: 1282 bytes% Typical baud rate limited run time: 754 milliseconds on QMS turbo PS820% Raw PostScript run time: 133 milliseconds on QMS turbo PS820

or so. From AppleWriter on a IIe.Most of the time, there is no point

in compiling PostScript unless youare (1) completely happy with youruncompiled version in its final formexcept for its speed; (2) are going touse your file at least several times inthe future, and (3) are using a commchannel that is not at all baud ratelimited, especially with the possiblylonger compiled code.

Or, separately (4) if you do notwant the end user to require or usethe original applications package.

Or, finally (5) if you are using ahorrendously slow phototypesetterfor all of your final high resolutioncamera-ready art. Even with only asingle use, you can sometimes use aPseudo-compiling to save bunchesof time and money.

Thus, while compiled PostScriptcode is outstanding for book-on-demand publishing from hard disk

based files or for a wide distributionof a printed circuit board pattern,you might not want it for everydayroutine use.

There are several approaches tocompiling. Rather than the strictdefinition of "make it all machinelanguage", we’ll define a compilingas any one-time stunt you can pullto reduce to an absolute minimumthe work PostScript has to performduring your future printings. Forinstance, there is no point in makingjustification calculations each time.Instead, you save only the results ofthose calculations and use theseresults instead.

One simple and rather obviouscompiling trick is called binding. Ifyou simply use a bind def instead ofdef, PostScript objects get linkeddirectly to other objects, eliminatingthe name lookups. Those //name im-mediately executed names also do

the same thing. Binding sometimesgives you a ten to fifteen percentspeedup. But it can also make anylater code modifications difficult todo. Full details in the red book.

By far the most general way ofcompiling PostScript code is with anAdobe product called the Distillery.Adobe has graciously uploaded afreeware copy of the Distillery toour GEnie PSRT RoundTable as ourfile #186 DISTILL.PS.

At any rate, what the Distillerydoes is intercept any operator thatwould make any marks on the page,such as lineto, awidthshow, and allthe other markers.

It then asks "What is the absoluteminimum amount of info needed touse this operator?" And then eitherreturns that info to your host forrecording, or else can write it to aselected hard disk file. The new filebecomes your run time code.

Their Distillery works great forsome routines and only so-so forothers. Often you have to try it andsee. You just might want to modifyyour programming style or youroriginal applications packages tomake better use of the Distillery.

While the Distillery often makescode much shorter, at times it canmake a simple and short routineinto an unbelievably complex datastring. Obviously, in these cases,you may want to mix the originalcode with the compiled code to getthe tightest final package.

While it is amazing what it doesand how well it generically handlespretty near any input, there aresome Distillery bugs. For instance,superscript and subscript aren’tsupported in the font matrix unlessyou make the character height andwidth at least slightly different. Andoriginal code that insists on usingindividually spaced words, ratherthan calling PostScript’s powerfulawidthshow operator, will produceinherently longer code. As much asthree times longer on the average.

The Distillery does not seem toknow how to save a path for reuse.This means that your entire pathgets repeated for such things as a filland stroke. Obviously, you could

68.4

ASK THE GURU

Fig. 4 – Accurate Graphics and Text on a Bezier Surface.

hand edit your intermediate code toget around this limitation.

Figure 2 shows you some typicalstock Distillery output.

I have just released the latestversion #13 of my new Guru’s GonzoJustify Power Tools. This code nowincludes an optional automatic andDistillery-compatible but text-onlycompiling feature. You can easilydownload a shareware copy and its documentation from PSRT on GEnie,or else write me directly for a freeprinted listing.

It is also possible to use a sneakynew technique which I call doubledistilling. Most PostScript end usersmost of the time become baud ratelimited, especially if they are usingAppleTalk. If you can pick up findany tricks that shorten your distilleryfiles while adding only a minorcomputation speed penalty, youmight further speed up your runtimes by as much as an extra 35percent or so.

For instance, you could drop anyleading or trailing zeros. For mostusers most of the time, you couldround off to four place accuracy.

You can eliminate spaces beforeor after self-delimiting parentheses.And trailing spaces within strings.And empty strings. At a tiny speedpenalty, you can eliminate the "0","0", and "32" and their interveningspaces which are used with a hori-zontally set awidthshow.

You can also sort your files so thateach font only gets changed once oneach page. The Distillery alreadypredefines "made" or "scaled" fontdictionaries such that only the veryfast and VM free setfont operator isused for an actual change. So yourgain by sorting is not spectacular.Still, as the figures show us, you dogain a fair amount of speed andsave enough characters this way toend up more than worthwhile.

Figure 3 shows you how yourDistillery file can be further short-ened by double distilling. At thistime, this process is custom andlabor intensive. Let me know if youhave any further interest in seeingimproved versions of this doubledistilling process.

When you are baud rate limited,your processing time is directlyproportional to the total number ofcharacters in your file. The "BaudRate Limited" times shown here arebased on the AppleTalk on a typicalMac that’s running at a 17 kilobaudeffective rate. Your own baud ratelimiting could easily become muchworse than this.

This is why we must have sharedSCSI comm now.

Any New ProductPackaging Ideas?

All of your laser printed output,book-on-demand published stuff, orsimilar software goodies should bedelivered to the end customer in anattractive, "see-thru", and protectedpackage of some sort.

The traditional method that theprintshops use is the same shrinkwrapping used in your grocery store.You can get further informationon shrink wrap products in Printer’sShopper, or Quick Printing, PrintingImpressions, or the Instant & SmallCommercial Printer mags.

But I think I’ve found a bettermethod. A good quality look, bettertouch, and best durability.

A number of years ago, severalfirms introduced Meals in Minutespouch packaging systems. Thesewere intended for sealing leftovers

in plastic baggies that could befrozen, boiled, or nuked. The best ofthese included a powered vacuumpump that actually sucked the extraair out of the package.

I think these are absolutely great,and these are one of the few thingsaround here that I actually use forits intended purpose. Well, some ofthe time anyway.

Apparently the product bombed,or at least the market got flooded,for all the discount houses are nowoffering these at bargain prices.

In particular, do check out thatDecoSonic from The Lighter Side, theSeal-A-Meal from COMB, PaknSavefrom Heartland, or Vac-U-Pac fromDamark. The prices are in the $19-$39range. Do make sure your model in-cludes a vacuum pump.

Now for the secret part. Thesework beautifully with the plain oldZip-lock bags, especially those heavyduty "freezer" versions.

One tip: You usually throw away the zip-lock part and just make therest of the plastic tightly fit yourproduct. To do this, simply peelaway your scrap side while yourplastic is still hot and you are stillholding the lever down. With somepractice, you’ll get a tight and uni-form edge seal every time.

We use them here at Synergetics toseal all our book-on-demand and

68.5

October, 1990

Fig. 5a – Excerpts From my Twixt Bezier Routines…

% Copyright c 1991 by Don Lancaster and Synergetics, Box 809, Thatcher AZ, 85552.All% commercial rights reserved. Personal use permitted if this header remains preset.% LaserWriter Secrets book+disk $29.50 VISA/MC. Free voice helpline (602) 428-473.% Available on GEnie PSRT library as #202 TWIXTBEZ.PS.

/mychardict 10 dict def mychardict dup

/F {611 {258 326 mt 373 320 391 304 423 177 ct 444 177 li 444 510 li 423 510 li 39 383 373 367258 361 ct 258 590 li 258 641 265 650 301 649 ct 387 647 li 544 643 552 508 562 47 ct 582 474li 582 681 li 17 681 li 17 660 li 69 660 99 627 99 575 ct 99 106 li 99 54 69 21 1721 ct 17 0 li 3400 li 340 21 li 288 21 258 54 258 106 ct cp }} put dup /R {722 {498 0 mt 695 0 li 65 21 li 683 21673 16 645 57 ct 455 335 li 516 350 561 374 594 425 ct 634 488 610 569 569 611 ct 15 666416 681 338 681 ct 26 681 li 26 660 li 78 660 108 627 108 575 ct 108 106 li 108 5478 21 26 21ct 26 0 li 349 0 li 349 21 li 297 21 267 54 267 106 ct 267 317 li 292 317 li cp 267 606 mt 267 633288 645 308 647 ct 383 655 417 622 437 586 ct 451 560 458 476 442 427 ct 412 338 36 350267 349 ct cp }} put dup /E {667 {262 326 mt 377 320 395 304 427 177 ct 448 177 li448 510 li427 510 li 395 383 377 367 262 361 ct 262 590 li 262 641 269 650 305 649 ct 391 64 li 548 643556 508 566 474 ct 586 474 li 586 681 li 21 681 li 21 660 li 73 660 103 627 103 57 ct 103 106 li103 54 73 21 21 21 ct 21 0 li 593 0 li 637 206 li 610 206 li 539 62 462 18 319 30 t 268 34 262 48262 99 ct cp }} put dup /space {250 {250 0 mt }} put dup /O {778 {733 336 mt 733 44 681 569591 627 ct 525 669 455 690 388 690 ct 321 690 251 669 185 627 ct 95 569 43 454 43 36 ct 43218 95 103 185 45 ct 251 3 321 -18 388 -18 ct 455 -18 525 3 591 45 ct 681 103 733 18 733 336ct cp 388 8 mt 370 8 349 12 327 23 ct 287 42 259 80 236 147 ct 221 190 211 261 211336 ct 211411 221 482 236 525 ct 259 592 287 630 327 649 ct 349 660 370 664 388 664 ct 406 64 427660 449 649 ct 489 630 517 592 540 525 ct 555 482 565 411 565 336 ct 565 261 555 10 540147 ct 517 80 489 42 449 23 ct 427 12 406 8 388 8 ct cp }} put dup /N {722 {617 -1 mt 617 575 li617 627 645 660 697 660 ct 697 681 li 498 681 li 498 660 li 550 660 578 627 578 57 ct 578 249li 230 681 li 20 681 li 20 660 li 47 660 57 639 71 622 ct 108 577 li 108 106 li 10 54 80 21 28 21ct 28 0 li 227 0 li 227 21 li 175 21 147 54 147 106 ct 147 529 li 588 -10 li cp }}put dup /T {667{409 649 mt 433 648 498 661 554 603 ct 603 553 602 505 607 479 ct 629 479 li 629 61 li 30681 li 30 479 li 52 479 li 57 505 56 553 105 603 ct 161 661 226 648 250 649 ct 250106 li 250 54220 21 168 21 ct 168 0 li 491 0 li 491 21 li 439 21 409 54 409 106 ct cp }} put po

/pcurveto {8 copy /y3 exch def /x3 exch def /y2 exch def /x2 exch def /y1 exch def/x1 exch def /y0exch def /x0 exch def} def /xtt {x3 x2 3 mul sub x1 3 mul add x0 sub tt 3 exp mul 2 3 mul x1 6mul neg add x0 3 mul add tt dup mul mul add x1 3 mul x0 3 mul neg add tt mul add x add} def/ytt {y3 y2 3 mul sub y1 3 mul add y0 sub tt 3 exp mul y2 3 mul y1 6 mul neg add y 3 mul add ttdup mul mul add y1 3 mul y0 3 mul neg add tt mul add y0 add} def

book+disk products, as well as forprotecting business cards and out-the-door orders. The sealers are alsogreat for protecting stuff at tradeshows from wear and tear.

You could get "real" polyethelenetubing through the Associated BagCompany or from Harwil, but that isno fun at all.

As usual, all of our Names andNumbers have now been gatheredtogether for you in the ending ap-pendix to this volume.

For this month’s contest, just tellme about any other gross abuse orobscene misuse that you’ve beenmaking in applying something wellaway from its intended purpose.For fun or profit.

This Month’s PostScriptUtility?

I thought I’d throw a real heavyat you this month. A new methodthat I’ve recently developed that letsyou quickly and accurately placetext and graphics on any surface

defined by a pair of cubic splinecurves. One typical "flag waving"example is shown you in figurefour, while enough excerpts of myPostScript code to get you goingappear in figure five.

Other obvious uses for my newTWIXTBEZ.PS routines are for ban-ner fonts, text on a cylinder, twistedfilm effects, pennants, any curvedperspective surfaces, fancy logos,lettering on a scroll, a funhousemirror reversal, and just about anyother distortion you can think of.The processing speed is ridiculouslyfaster than the earlier pixel line re-mapping we looked at earlier.

The method uses bits and piecesof stuff from previous columns andfrom the Ask The Guru III reprints.Especially the nonlinear transfor-mations, the length of Bezier curves,and stopping at the selected pointalong a single Bezier curve.

The new black magic added here,though, will involve automaticallyconverting straight lines into smooth

flowing curves, given only the endpoints of those lines! Thus, the topsand bottoms of all your letters willproperly curve themselves to con-form to your new surface.

In the routines shown here, allvertical lines are kept that way. Thisis what you usually will want in anytext-oriented logo or clip art.

Where do you start? Your text orgraphics must first get completelyconverted into combinations of oneof four allowed routines. These aremt movetos, li linetos, ct curvetos,and cp closepaths. Characters in anyfont must be predefined into a 1000point high proc definition of form{ -charwidth- {char defs using only mt,li, ct, and cp}}.

Now for the tricky part. You canoptionally convert any of those ltlinetos into a curve that smoothlyflows over your new surface! To dothis, you first set showlinesascurvesto true. Your code then takes anylinetos and neatly breaks them upinto individual numcurvesperlinetosegments. Each individual segmentis then changed into a cubic spline,both of whose influence points liehalfway along their original linepath, thus "bending" it.

What this does is convert youroriginal line into an end alignedgroup of fairly weak curved splines.This guarantees you are at the right point on the surface at each end ofeach spline, rather than the "shortcut" your single straight line wouldattempt. Since each spline itself canend up curved, this further helps"adhere" to your new surface.

In figure four, four curves perlineto are used to bend the tops andbottoms of all the letters, whilesixteen curves per lineto are usedfor your upper and bottom lineswhich have to sweep clear acrossthe entire surface. Naturally, themore curves you use, the betterlooking your result, but the slowerthe calcs.

While not immediately obvious,the closepath operator also needsmodified so it does not take anyshortcuts. One rather easy way tohandle this is to close up the pathyourself, and then only use closepath

68.6

ASK THE GURU

Fig. 5b – …Twixt Bezier Routines, continued.

/bezierlength {pcurveto /oldx x0 def /oldy y0 def /blength 0 def 0 1 numpoints 1 sub div1.0001 {/tt exch def xtt ytt /newy exch def /newx exch def newx oldx sub dup mul newy oldysub dup mul add sqrt blength add /blength exch def /oldy newy def /oldx newx def} forblength }def /numpoints 30 def

/buildpatharray {/mat exch def mat 0 get /xx0 exch def mat 1 get /yy0 exch def mat 3 get /xx3exch def mat 4 get /yy3 exch def xx0 xx3 sub dup mul yy0 yy3 sub dup mul add sqrt 3 divgunghofactor mul /zz0 exch def mat 2 get cos zz0 mul xx0 add /xx1 exch def mat 2 get sinzz0 mul yy0 add /yy1 exch def xx3 mat 5 get cos zz0 mul sub /xx2 exch def yy3 mat 5 get sinzz0 mul sub /yy2 exch def mark xx0 yy0 xx1 yy1 xx2 yy2 xx3 yy3 bezierlength]} def

/setlowerpath {buildpatharray /lowerpath exch def} def /setupperpath {buildpatharray/upperpath exch def} def /botftt {lowerpath twixtftt} def /topftt {upperpath twixtftt} def

/twixtftt {/arry exch def /tt exch def arry 0 get /x0 exch def arry 1 get /y0 exch def arry 2 get/x1 exch def arry 3 get /y1 exch def arry 4 get /x2 exch def arry 5 get /y2 exch def arry 6 get/x3 exch def arry 7 get /y3 exch def x3 x2 3 mul sub x1 3 mul add x0 sub tt 3 exp mul x2 3mul x1 6 mul neg add x0 3 mul add tt dup mul mul add x1 3 mul x0 3 mul neg add tt mul addx0 add y3 y2 3 mul sub y1 3 mul add y0 sub tt 3 exp mul y2 3 mul y1 6 mul neg add y0 3 muladd tt dup mul mul add y1 3 mul y0 3 mul neg add tt mul add y0 add} def

/mt {savecp exch fontsize 0 get mul .001 mul xoffset add exch fontsize 3 get mul .001 mulyoffset add nlt moveto} def /origli {savecp exch fontsize 0 get mul .001 mul xoffset add exchfontsize 3 get mul .001 mul yoffset add nlt lineto} def /ct {savecp 3 {6 2 roll exch fontsize 0get mul .001 mul xoffset add exch fontsize 3 get mul .001 mul yoffset add nlt} repeat curveto}def /cp {closepath} def /savecp {2 copy /ycp exch def /xcp exch def} def /lict {/yy exch def /xxexch def yy ycp sub numcurvesperlineto dup add div /yd exch def xx xcp subnumcurvesperlineto dup add div /xd exch def numcurvesperlineto {xcp xd add ycp yd add 2copy xcp xd 2 mul add ycp yd 2 mul add ct} repeat} def /li {showlinesascurves {lict}{origli}ifelse} def

/twsshow {/msg exch def /yoffset exch def /xoffset exch def /strrx (X) def msg {strrx exch 0exch put strrx dup ( ) eq {pop (space)} if cvn mychardict exch get exec exec bezcharprocfontsize 0 get mul 0.001 mul extrakern add xoffset add /xoffset exch def} forall} def/sketchmode {/fontsize [1000 0 0 1000 0 0] def /xoffset 0 def /yoffset 0 def} def /nlt {/yyyyexch def /xxxx exch def upperpath 1 get lowerpath 1 get sub /unitheight exch def xxxxlowerpath 8 get div /tt exch def tt botftt /ybotpos exch def /xbotpos exch def tt topftt /ytopposexch def /xtoppos exch def xbotpos yyyy unitheight div ytoppos ybotpos sub mul ybotpos add} def

% //// demo - remove or alter before reuse. ////

100 200 moveto 10 dup scale /showlinesascurves true def /gunghofactor 2 def 106 45 {dupmul exch dup mul add 1.0 exch sub} setscreen [2 1 80 32 14 55] setlowerpath [2 14 45 32 1650] setupperpath

sketchmode 0.2 setlinewidth 1 setlinejoin 1 setlinecap /numcurvesperlineto 16 def 0 13 mt 3413 li 34 0 li 0 0 li cp gsave 0.95 setgray fill grestore stroke

/numcurvesperlineto 4 def /extrakern 0.1 def /bezcharproc {fill} def /fontsize [5.5 0 0 10 0 0]def 2 3 (FREE F) twsshow xoffset 0.3 sub yoffset (O) twsshow xoffset 0.3 sub yoffset (N)twsshow /fontsize [4.5 0 0 10 0 0] def xoffset yoffset (T) twsshow showpage quit

as a zero-length formality.You select your upper and lower

Bezier surfaces using an [x0 y0 ang0x1 y1 ang1] matrix. Regular Ask theGuru readers will recognize this asthe same matrix employed for a twopoint gonzo curvetracing. In thismatrix, x0 and y0 are the startingcoordinates of your curve, whileang0 is the angle you want to headout in as a first step.

Similarly, x1 and y1 form yourending coordinates of your curve,and ang1 is the final direction thecurve is heading in just as it reachesthe end point. As usual, 0 degrees isdead east, while 90 degrees pointsdue north.

With a single curve, you can be"bent", have an "S" shaped inflectionpoint, could have a single cusp, ormight even loop. For fancier paths,you can repeat the entire process as often as you need to.

The upper curved path will onlybe approximate. This does happenbecause we want to keep verticalsstraight up and down, and becausethings occur faster in the "t" spacealong the "more bent" portions ofany spline. Any exact solution heremight involve repeatedly solvingugly cubic equations.

Thus, if your upper path doesn’tgive you quite what you want onthe first cut, just bend it a little moreor a little less, and it should fall inplace the way you intend it to.

Drawing and graphics gets doneby using your sketchmode feature.You should call the sketchmode procimmediately before any drawing isdone. This scales things so you areworking directly in points on yourBezier surface. The x direction isnow along your curved surface, andyour y direction stays vertical.

Characters are shown using mynew nonlinear variant of the ashowoperator called twsshow. The heightand width of each individual letteris selected by a /fontsize [width 0 0height 0 0] def matrix.

What you do with your characterpath is set by bezcharproc.

Instead of the simple fill shownhere, you could outline and stroke,shadow, choke, spread, flow, or do

most any combination of the specialeffects. Note that this is insanelymore flexible than what the originalashow operator permitted.

You can do individual characterkerning by following the examplesdetailed in figure five. In this case,we have tightened the distance oneither side of the "O" and made thefinal "T" somewhat narrower than isnormal. Note that things happenfaster on the "more bent" portions ofyour curved surface. You can alsomix character heights and verticaloffsets for special effects, especiallyfor menus or product labels.

We will be seeing several moreexamples of these non-linear text

transformations right here, on myGEnie PSRT, and in my LaserWriterSecrets reprint series.

Those rumored improvements inPostScript level II should make anon-the-fly font path grabbing andnonlinear transformation a quickand easy process. Sadly, we are notquite there yet.

Fully commented TWIXTBEZ.PSroutines appear in the GEnie PSRTlibrary as file #202. You can call mefor a free printed copy.

As a second contest this month,just send me any old clip art, useexample, or any extensions to myTWIXTBEZ.PS routines that you’vefound handy. ❆

Don Lancaster’s

ASK THE GURUNovember, 1990

Material Conversion SecretsEmergency Password Repairs

Book-on-Demand PublishingLamination and Page Protection

Toner Cartridge Refilling Update

69.1

Fig. 1 – Refilling a Canon CX cartridge.

To refill an older CX cartridge with the punch-and-go method, you firstsnap off the cardboard label and then drill a toner filling hole…

A second CX hole is needed to let you empty the spent toner holding tank.This area is found underneath the cartridge…

Drill a 5/8 inch hole usinga #3 Vise Grip Unibit;carefully clear all chips.

Drill 3/8 inch hole usinga #3 Vise Grip Unibit;carefully clear all chips.

Apparently the system doeswork. At least for some ofthe people during some of

the time. As you should know bynow, Apple Computer has its newcustomer service line up and run-ning at (800) 776-2333.

Their hotline is intended as anappeals court for any non-technicalproblems only. To use it, you mustalready have gone through yourdealer or service center and giventhem every reasonable chance tocorrect your problem.

I inadvertently got to test thishelp line over one major mishapinvolving a fatally flawed AppleLaserWriter mailing list rental. Thesystem works, and Apple is to behighly commended for it.

Apple has also released somenew system software for their older

machines. This now includes IIGSsystem software version 5.0.4 andthe IIE system software version 3.2,otherwise known as ProDOS 1.9. Atlong last, a stab was made at somemore or less useful QUIT code!

As we have seen a time or twobefore, the best place for ongoingtechnical info on any older Appleproducts is Tom Weishaar at A2Central. Besides a great newsletter,he stocks all sorts of IIgs and IIebooks, disk based magazines, andnice software products. Tom also isinvolved in those A2 and A2PROboards on GEnie. You’ll find manytens of thousands of downloads onthese, including additional info onthe new system software.

Hewlett Packard has combined theservice and repair manuals for theirIID and IIID duplex printers into a

newer and compact manual. Theirstock #33459-90906. Apparently thelargest mechanical difference be-tween these two is that the IIID has alumpier case.

While that IIID should be fasterand offer the higher print quality(owing to a new dot modulation), Ihave held off testing it since thecurrent HP PostScript cartridge issuch a fatally flawed wimp.

Hopefully, the new PostScript IIcartridge should soon be availableand should solve the duplex copy-page problem. Stay tuned.

And you saw it here first: Watchfor a 50 megabyte SCSI hard diskthat’s built into a removable plug-in font cartridge! This could reallysolve some major hassles if it getstightly linked to the PostScript fontcacheing and if it also supports di-rect shared SCSI comm.

Two corrections to our previouscolumns: The QMS Turbo PS820 isin fact memory expandable to eightmegabytes; my test machine wasnot. I would recommend a threemegabyte minimum for this printerwhen used with a hard disk. Andyet another obvious use for com-piled PostScript is to dramaticallyshorten the long makeready timeson fancy phototypesetters.

A reminder here that we now dohave a great PSRT RoundTable upon GEnie with lots of PostScript andother Ask the Guru and LaserWriterCorner stuff on it. And including de-bugged and ready-for-use down-loads of most of the printed routinesyou see here. You should voice call(800) 638-9636 for connect info. I’vealso put together a PSRT samplerdisk for you. Call or write me perthe appendix for details.

What’s Happening inToner Cartridge Refilling?

By now, you regular Ask the Gurureaders should know that Canontoner cartridges as are used in the

69.2

ASK THE GURU

Fig. 2 – Refilling a Canon SX cartridge.

The SX cartridge punch-and-go refilling process is similar to the CX,except for the hole locations. The filler hole is shown here…

One or more spent toner drain holes must also get added to the SXcartridge. The plastic is thin, so use a conical step drill…

Drill 5/8 inch hole usinga #3 Vise Grip Unibit;carefully clear all chips

Drill 3/8 inch hole usinga #3 Vise Grip Unibit;carefully clear all chips

Be certain that the newhole is centered betweenthe die sink marks!

LaserWriters, LaserJets, and QMSprinters can be easily refilled byyourself for around $6 per shot.Because of up to a 15:1 reduction inall your per-page toner costs, it isinsane not to personally do all your own cartridge recharging. Not tomention considerably better printquality, many newer toner options,and much longer cartridge life.

There’s lots of new things comingdown in the refilling industry. Thebiggest news involves all the newthird-party retrofitted hard coateddrums, which are good for a dozenor more low-hassle refills. Copymateis one importer, and the drums areavailable in smaller quantities frommy two ongoing favorite refillingsupply houses of Don Thompson andLazer Products.

As usual, most of the Names &Numbers listed here have beengathered together into a commonending appendix to this volume.

Meanwhile, that Recharger tradejournal has matured into a "musthave" resource. Two of the latest hotproducts are that Channelock #357end cutter for pulling the main LXcartridge pins, and a great cleaningand conditioning solvent known asBestine from Union Rubber.

Figures one through three showyou how to refill all your own CX(LaserWriter Plus), SX (LaserWriterNT and NTX), or the LX (PersonalLaserWriter NT) cartridges.

I overwhelmingly prefer to usewhat I call the punch and go method,since this delivers far and away thelowest possible end user per-pagetoner costs. As an end user, yourultimate goal should be your finalper-page costs, and not your totalnumber of actual recharges per car-tridge that you get.

My punch-and-go method veryhighly displeases certain rechargerswho insist that arcane tools andtechniques are essential to refill acartridge. In reality, anyone can doa punch-and-go in two minutes flat.Once again, the object is the lowestpossible per-page toner costs to theend user. Total teardown clearlyfails to deliver on end-user bottomline costs.

We still charge around $18 for arefilling in our strictly limited andhand carried six mile service area. Ican still get away with such an out-rageously high charge since I live ina very remote rural area. But wevery strongly urge our customers todo their own refilling. Travel of any kind is bad news for the cartridges.So is swapping your own cartridgesfor unknown outsiders.

I strongly recommend you limityour recharging services to a sixmile or smaller radius. Just as indelivering pizza, very ugly thingshappen to your reliability, yourquality control, operating costs,your profits, and your customerrelations should you dare exceedthis absolute maximum customerservice area.

Actually, I can not fathom whyanyone anywhere would ever use arecharging service, when they caneasily do the job themselves in twominutes flat for less than $6. Thattranslates to paying someone else asmuch as $1200 per hour to not get

their hands dirty.At any rate, details for the CX

cartridge appear in figure one, theSX in figure two, and on the LX infigure three. The general idea isfourfold: Firstoff, you remove any"used" toner from the spent tonerholding tank. Then you refill thefresh toner hopper with a newbottle of toner, typically 250 gramsor so. Third, you replace the fusionwiper felt pad in the printer itself.And finally, you update the tonerhistory label for accurate records.

With my method, the CX and SXcartridges need two holes drilledin them on your first refill. The bestway to handle this is with a specialconical drill called a #3Unibit byVise-Grip. Jensen Tools has them, ifyou can’t find one at a larger hard-ware store. This "ice cream cone"shaped step drill cuts a perfectlysmooth and round hole in thinbrittle plastic, while producing asingle and easily removed chip. Theholes are easily sealed with ScotchTape. Or, to get fancier, you can use

69.3

November, 1990

Fig. 3 – Refilling a Canon LX cartridge.

FIRST, remove this springusing a homemade "J" tool.

SECOND, pull these pins toremove the fresh toner tankfor easy refilling.

THIRD, Remove the screwsto change the hard drum or

drain out the spent toner.

The LX cartridge does not need any modifications before any refill, hard drumupgrade, or any spent toner draining…

But be EXTREMELY careful not to touch the photosensitive drum or expose itto any strong light or ANY light of long duration.

a nickel Caplug.Naturally, you do have to be

certain you get a very good seal ifyou use tape. After doing literallythousands of refills, I have yet tohave any tape ever come loose. Butdo be extra careful.

Those newer LX cartridges aremuch simpler to refill. You first pullthe two main pins and then pop outthe fresh toner cartridge. Then youuse the Caplug that’s already therefor your refill. You can often go tworefills without draining the spenttoner holding tank. To empty thistank, remove both the nylon drumbearings using four Phillips screws,and then carefully remove the drum,avoiding any and all fingerprints orany and all exposure to any stronglight. Outdoors, your spent tonercan simply be gently shaken out, orelse vacuumed.

After all these years, Canon is toget attaboyed for producing a moreor less maintainable and refillablecartridge.

A dab of Locktite on the main pinsis a good idea. If your pins comeloose, try replacing them with ex-

pandable "C" pins from Small Parts.Or use some epoxy.

Once again, you should alsoreplace your fuser wiper wand andclean both corona charging wiresevery time you do a reload.

For all my own book-on-demandproduction, I will typically buy aused-one-time cartridge having apreinstalled longer life Copymatedrum, and then punch and go fromthere. I’ve been using all of thesetechniques for many millions ofcopies to date, and they sure seemto work for me. At $30 per drum andnine refills at $6, you are looking atper-page toner costs of 0.21 cents.Which is well within the acceptablerange for all of my book-on-demandpublishing.

Speaking of which…

Update me on YourBook-on-Demand

PublishingThe story so far: Several years ago

it appeared to me that traditionalbook publishing was rapidly goingto hell in a handbasket. The days of"mail in your manuscript and then

laugh all the way to the bank" wereclearly ending.

We’ve seen bunches of publishermega-mergers that have left fewerand fewer places to submit books.The submission process itself hasalso gotten out of hand because ofthose infamous and notoriously in-competent publisher’s committees,who will sit on a title for fourteenmonths and then return it because itwas "not timely". Author’s royaltiesare sharply reduced, and furtherfrustrated by creative accountingpractices.

We’ve had those chains replacethe Mom and Pop bookstores, whonow stock more individual copies offar fewer total titles. And who willautomatically tear off and returncovers for credit for virtually alltitles after an intolerably brief 22weeks on their shelves.

Worst of all, we’ve had the IRSdecide to start paying publishers toshred books, just like those othergovernment agencies pay farmersnot to grow crops.

All this happened because of anaccounting rule change. Backlisttitles must now be carried at theirfull value, instead of their scrap orremainder value. The net result wasthe virtual elimination of backlists.Put in another light, the IRS hasrecently caused more books to getshredded than were destroyed in allof the dark ages. Many times over.

And people are simply buyingfewer books than they otherwisemight because of "alternate infor-mation formats" such as in videorentals, computer games, the tradejournals, cable services, and tele-computing. Out here on my sanddune, I could rent a video from adozen nearby places, but a 300 miledrive is involved for me to reach mynearest usable bookstore.

One revolutionary new methodof creating and disseminating info isone which I call Book-on-Demandpublishing.

With my Book-on-Demand pub-lishing, all the individual titles areproduced and delivered only whenand as they are ordered. Which caneliminate most of the staggering

69.4

ASK THE GURU

Fig. 4 – Pelsaer binding lets you print on spines.

HOT GLUE PREFORM

YOUR CUSTOM COVER

YOUR CUSTOM TEXT

REMOVABLE FLYLEAF

front end expenses of traditionalpublishing. Production costs areridiculously lower, especially if thetotal number of copies that actuallyend up geting sold are unknown.

Production times from authorsubmission to your first reviewercopies can be measured in minutesrather than months. You can alsonow target a title much more tightlyto your intended reader. Such valueadded items as companion disks,templates, or ready-to-use printedcircuit mylars can now be easilyincluded in your product.

When using Book-on-demand,the quaintly outdated concept of"getting a manuscript accepted" nolonger has any meaning. Author’sroyalties can now be paid hourly, or at the serious risk of getting a "slowpay" reputation, only twice a day.

Because you have no inventory,there are no remainders, and yourbacklist can continue forever, free ofany IRS penalties. Changes can bemade at any time for any reason.Under certain conditions, authorroyalties can exceed 90 percent ofthe final reader list price. Yourworks can be customized for anyuser, up to and including puttingtheir name in gold on the cover.

Above all, you get to make allof your own mistakes, rather thanhaving to pay others to make themfor you. Things get done your way,rather than the way others decidedwas good for you.

Key secrets to Book-on-Demandpublishing include using genuineAdobe PostScript on a duplex (twosided) printing engine; workingdirectly in raw PostScript (mostespecially all figures and artwork);personally doing all of your ownmaintenance and cartridge refillingto keep per-page printing costs inthat 0.2 cents per page region; be-coming very strongly SCSI commoriented; and compiling all yourPostScript code to virtually elim-inate page makeready times.

Despite several really serioushardware limitations, the Book-on-Demand publishing already workswell. I’m currently publishing eighttitles by this method, and will cer-

tainly be doing lots more.Eventually, I’d want to combine

Book-on-Demand with CD-ROM,providing a one zillion title disk andan attractive printing materials kitdirectly to the end user.

Unlike some of those "books-on-disk" folks, I very strongly feel thatan attractively bound paper hardcopy sets the absolute essence ofpublishing – Omit the actual booksthemselves, and you will end uphaving thrown out the baby anddrunken the washwater.

At present, any decent duplexprinter does not exist, since both ofthe HP IID and IIID machines arehopelessly (and apparently inten-tionally) crippled. But the Canonduplex engine itself seems to workjust fine, although it is quirky and atad on the slow side.

What we need (and should veryshortly see) is this engine combinedwith PostScript Level II and a fastRISC computer, a reliable sharedSCSI hard disk and comm setup,large paper capacities at both ends,and some dot modulation for en-hanced resolution.

My prediction is that this newmachine’s label will start with a Q,rather than an H or an A.

The goal here is the overnightproduction of a fully collated pile ofbooks ready for binding. Totallyunattended by either a person or a

host computer.At any rate, several of my titles

are painfully and slowly producedovernight on a IID in its full duplexmode, while most of the other onesrun on the ridiculously faster andinfinitely easier to use (but sadlynon-duplex) Turbo PS820.

Yes, the IIID would be faster. But, at this writing, you are still stuckwith the same wimpy old Post-Script cartridge having a fatallyflawed duplex copypage.

While I’m still using the Unibindcover processing, their brand newPelsaer system has a lot going for itin that you can now print on yourspines and have an unlimited choiceof protected and laminated covermaterials. Figure four once againshows you this new binding.

My LaserWriter Secrets book nowprints in around 28 minutes, and Ishould shortly be able to double thisspeed. Such a doubling translates toroughly a half of a million dollars ofproduct per printer per year.

Besides a genuinely useful duplexprinter, other stuff sorely needednext include an improved bindingprocess beyond Pelsaer, perhaps acold glue one, along with sharplyreduced costs of desktop finishingmachinery such as cutters, joggers,and laminators.

We also need effective ways ofdramatically speeding up all the

69.5

November, 1990

Fig. 5 – PostScript trashed password emergency repair.

% This utility attempts to read your existing password and reports it to you.% It is intended solely for Adobe 68000 machines, and may fail if your% EEPROM or non-volatile memory is in fact defective.

/#.{ userdict begin <204F3399020E00010402001001FC0012206F000443F9000001E822C822D822D822D84EF900000092D1F9000001EC20504ED0D1F9000001F020504ED02F08206F00043050D1F9000001EC2F500004205F4E7500004E56FFFC4EBA014E2D40FFFC4A806D0A0CAE00000200FFFC6D0A487A00E84EBA0114584F2F2EFFFC2079000001F84E90584F2F004EBA012E584F4E5E4E754E56FFF0487A00CB4EBA0104584F20402F2800042F104EBA00EE20402F2800042F104EBA00CA4FEF00102D40FFF020402D50FFF82D680004FFFC08EE0007FFF82F2EFFFC2F2EFFF84EBA00B4504F4A8066564EBA00CA4EBA00EE2D40FFF4202EFFF44EBA00DA41FA004E4EBA00CA661A23FC0026FEF4000001F8487AFF46487A00594EBA00AA504F6028202EFFF44EBA00AE41FA002A4EBA009E6D0C23FC000001E0000001F860D2487A00394EBA0048584F4E5E4E754037000000000000403D33333333333372616E6765636865636B0076657273696F6E00726561646565726F6D00756E646566696E65640000307C00744EFAFEA2307C007C4EFAFE9A307C008C4EFAFE92307C009C4EFAFE8A307C00B44EFAFE82307C00E04EFAFE7A307C00E84EFAFE72307C01004EFAFE6A307C011C4EFAFE624EBAFE72000400004EBAFE6A000C00004EBAFE6200280000307CFFD04EFAFE42000000000000000000000000000000000000000000160024002A00340046007E0108013001340000> cexec currentfile closefile} def <000000000101> eexec

/dumpeprom {0 1 511 {dup 16 mod 0 eq{ (n) print flush} if readeerom dup 16 lt {(0) printflush} if 16 ( ) cvrs print ( ) print flush} for (n) print flush ( current password = ) prinreadpassword 10 ( ) cvrs print (n) print flush} def

/printeprom {/Courier findfont 12 scalefont setfont 50 750 moveto (Eprom dump ) show 50700 moveto 0 1 511 {dup 16 mod 0 eq {dup 0 ne {dup ( decimal address= )show 10 () cvrs show}if currentpoint 12 sub exch pop 50 exch moveto} if readeerom dup 16 lt {(0)show} if 16 ( ) cvrs show ( ) show} for 512 ( decimal address= )show 10 ( ) cvrs showcurrentpoint 24 sub exch pop 50 exch moveto (Current password = ) showreadpassword 10 ( ) cvrs show currentpoint 24 sub exch pop 50 exch moveto(Password is in 177-180, SN is 509-512) show currentpoint 12 sub exch pop 50 exchmoveto (Normal access eescratch starts at 187) show currentpoint 12 sub exch pop 50exch moveto (Horizontal margin value long at 169) show currentpoint 12 sub exch pop 50exch moveto (Vertical margin value long at 173) show currentpoint 12 sub exch pop 50exch moveto (an empty long at 165) show currentpoint 12 sub exch pop 50 exch moveto(printer name starts at 132-164) show currentpoint 12 sub exch pop 50 exch moveto(Brought to you, by Woody Baker )show currentpoint 12 sub exch pop 50 exchmoveto (Rt.1 Box I, Manor, Tx. 78653 512-272-4511) show showpage} def

/readpassword {177 readeerom 24 bitshift 178 readeerom 16 bitshift or 179 readeerom 8bitshift or 180 readeerom or} def

printeprom dumpeprom readpassword == flush quit

PostScript applications packages sothey can someday compete with thepage makeup times and compactsize of raw PostScript.

As of this writing, the next stepsin Book-on-Demand are a Level IIduplex printer, an improved bind-ing system, simplified compiling,better lamination and covers, and asanely priced trimmer. Plus, ofcourse, wider CD ROM availabilityand improved distribution.

I’m actively working on solvingthese problems as they becomeeconomically feasible. It is all just amatter of time and priorities.

For more on Book-on-Demandpublishing see GEnie PSRT Library#77 DEMAND.TXT, or join me andthe others in several of our livelyRoundTable discussions on thisexciting new opportunity.

Tell Me About LaminatingOne of the sad things about toner

is that it isn’t nearly as versatile asink. At least not yet. Toner is notremotely as durable, doesn’t comein lots of great colors, and does notlet you do all sorts of really neatstuff like all the "fuzzy" hot splitplastisol screen inks from Gerber orthe raised thermography inks fromSunray or Thermotype.

We’ve already seen Kroy Color asone possible way to alter the colorand visual effects from your laserprintouts. But, what else can getdone to make your toner productsmore durable? Especially for suchtouchy-feely things as book coversor restaurant menus?

One little known technique iscalled Bakerizing. This is a zero cost

process to make toner far moredurable while you simultaneouslypick up a medium gloss.

To Bakerize, simply place yourfinal toner image in contact with aclear piece of half mil mylar. Thenapply heat and pressure. An emptyor "fully used" Kroy Color carriercan work just fine for this.

You can get a quick sample ofwhat Bakerizing is all about byopening the lid on your printerwhen a page is a third of the wayout. After clearing the paper jam,the portion of the page that wasunder the fusion rollers will beBakerized to a durable high gloss.

The Kroy Color folks do offer ahandy and useful clear laminatingmaterial which looks great whileoffering reasonable protection. AndI often use these for book covers,menus, business cards, and evenbumperstickers. But the pricing istotally and outrageously out of lineat 70 cents per sheet or more.

Lower cost alternatives to KroyColor materials and machines areavailable through Lazer Products.

One tip with these materials:Either laminate both sides, or else"backroll" your product against atable edge to prevent curling.

Trade book covers often use oneof four methods to improve theirscuff resistance. The cheapest routeis nothing at all, being careful to useas little ink as possible and avoidingboth tiny print and large solid inkareas, especially bleeds.

The next cheapest options are avarnish overcoat, or the more costlyand more durable uv-curing clearink overcoat. The best of all is toactually use a polyester or otherclear film overlay. Since the inkends up under the plastic, you haveto scuff your way through the filmbefore abrading the ink.

Before I tell you where to go forthese films, let’s take a short sidetrip. Have you ever wondered pre-cisely where your last potato chipbag came from?

No, not from a printer, but froma bizarre and a little-known outfitcalled a converter. These folks takelarge rolls of stuff, and then print

69.6

ASK THE GURU

and chomp and glue and score andfold and laminate and diecut andwhatever to make all of the pack-aging products you see today.

Now, here’s the kicker – most ofthose big rolls of stuff are cheap,especially on a square foot (orindustry standard MSI "thousandsquare inches") basis. Those actualconversion costs are not all thatexpensive either, provided the jobrun is long enough to pay for thesetup and any die costs.

But the person hiring the con-verter makes you pay through thenose. The reasoning is that "valueadded" and the "distribution" costshave to get paid somehow. Thematerials cost of just about anythingyou’d find blister packed in a hobbyor craft shop drives this home.

For instance, a laminating plasticbought by the big unconverted rollshould cost you around three centsper book or less. Should you hire aconverter to do some cutting foryou, another half cent or possibly afull penny would be involved. Thevery same sheet from your friendlyneighborhood Kroy dealer will costyou seventy cents or more.

The bottom line here is simple: Doall of your own converting! Or elsehire a converter to do so for you ona per-job absolute minimum basis.This eliminates a bunch of middle-men and distributors.

I’m currently in the process ofevaluating several polyester lam-inating film sources. These includeCatalina Plastics, Multi-Plastics, Mad-ico/FSK and Intermax Trading. I dosuspect that precut self-adhesivesheets will be much easier to workwith than bulk rolls.

Sadly, converters are very hard tocommunicate with. They do speaktheir own language and live in theirown little world. And seem rarelyinterested in anything new.

There’s also lots of traditionallamination machines available, ascan be used for badges, passports,maps, or diplomas. The plasticsused here are usually much heavierand often much more expensive.They also are far from subtle andcan end up looking on the gross side

of gruesome. One source of thesemachines and supplies is Printer’sShopper; a second reasonably pricedsource is USI Image Creators. Watchfor their loss leader sales, wheremachines get as low as $140..

As usual, more information onmost of these products is availableby way of our Names and Numbersappendix. Important trade journalsfor the converting industry are Con-verting, the Paper, Film, and FoilConverter, and the Packaging andConverting magazines.

For this month’s contest, just sendme an essay in 50,000 words or lesson "The ways I protect and improveupon my toner images". There’ll beall of those usual Incredible SecretMoney Machine book prizes, plus anall expense paid (FOB Thatcher, AZ)tinaja quest for two going to the verybest of all. As usual, send all yourwritten entries directly to me here atSynergetics, rather than to ComputerShopper editorial.

This Month’sPostScript Utility?

This month’s PostScript utilitywas contributed by Woody Baker.Woody, as you regular Ask the Gurureaders already know, is the devel-oper of the Bakerizing process of thepreceeding section, besides havingauthored many unique PostScriptprocedures and routines.

There are times and places whereyour PostScript password may blowup. Perhaps you may have forgottenit if you were dumb enough to everchange it from zero. Or possibly aflakey piece of software has trashedit. Or maybe a virus on your net-work has maliciously altered it.

Depending upon the machine, theconsequences of a blown passwordcan range from an inconvenience toan unmitigated disaster.

For instance, on those originalLaserWriter and LaserWriter Plus ma-chines, to very this day Apple willrequire around $1200 and severalweeks time for a simple passwordreset. And with no guarantee what-soever that the very same problemwill not happen all over again threeminutes later.

On the newer LaserWriter NTX,the problem is not nearly as bad. Toforce a password reset, simply flipto the AppleTalk position underpower, wait half a minute, flip backto Serial, and repeat the process.This will reset your password backto zero. And, of course, trash out allof your serial settings in the process.

Even with no blowups, it is niceevery now and then to be able tomake sure that nobody is messingaround with your machine.

So, this month’s PostScript utilityis an emergency trashed passwordrepair program. Figure five showsfull details. All this does is readyour existing password back toyour host, in addition to giving youa complete printed dump of thepassword itself and all of the 256nonvolatile memory locations.

The code is Adobe specific, butdoes seem to work on most "real"versions of PostScript.

Once you verify your presentpassword, you can easily reset itback to 0 by doing a…

serverdict begincurrentpassword exitserver

statusdict begincurrentpassword 0

setpassword end quit

This is a lot safer than blindly andautomatically forcing the machinelanguage reset by directly writing tothe nonvolatile storage area.

You will find this file all ready todownload as GEnie PSRT Library#188 PASWRDFX.PS.

Please let me know what youwant to see in the way of futurePostScript utilities. There’s lots ofstuff that I’d dearly love to do thatjust might not have a wide enoughinterest base to be worthwhile.

I hope to have a real heavy foryou as next month’s PostScriptUtility – a complete and a sophis-ticated stock history investmentanalysis program. Which does usePostScript as language, rather thanPostScript as a plain old papermarker. Be sure to watch for it. Or ifyou do want to get in ahead of thehoarders, check out our GEnie PSRTlibrary files #221 and #223. ❆

Don Lancaster’s

ASK THE GURUJune, 1991

PS Level II featuresStock history analyzer

Unusual print materialsNew PostScript products

Improving toner durability

70.1

Fig. 1 – Some new features of PostScript Level II.

1. – ASSORTED GOODIES

Level II code is inherently much faster than earlier versions, and speedsup even further with new RISC processors. Dictionaries now dynamicallyalter their sizes, eliminating dictfull errors. Erratic linewidths on repeatedlines can be made uniform with a new strokeadjust feature. A new class ofresources is available. Garbage collection and VM reclamation is nowpossible. New pattern features greatly improve tiling.

2. – BINARY ENCODING

A new ultra-dense and token based coding scheme is available that letsyou place PostScript code in a compact form that still executes rapidly.

3. – COLOR ENHANCEMENTS

A number of new color formats are now supported including RGB, CIE,and CMYK. Halftone screens have been expanded to allow dramaticallybetter control of full color images, especially on the high end.

4. – FILTERS

A filter is a super-emulator that puts itself between your data source andthe printer. Some of the early filters include ASCII85, which is much moreefficient than Hex ASCII; TIFF personal computer compacation; CCITT,which gives you instant fax coding and formatting, JPEG, which is able tocompress color pictures by as much as 100:1; and RUNLENGTH, whichcompacts black and white bitmaps.

5. – FONT PATHS

Most font paths are fully recoverable for non-linear transformation as thefont lockout on pathforall has finally (!) been removed. Amen.

6. – FORMS

Forms can be created and cached ahead of time and then get rapidlydropped in place. This is especially useful in step-and-repeat projectssuch as business cards.

7. – USER PATHS

Automatic proc caching is now possible for logos or other complicatedroutines that are to be reused. Instead of rebuilding the entire routine oneach reuse, a cached bitmap is used instead. This can be much faster.

Expect bunches of brand newPostScript Level II printersjust about the time you are

reading this. I’m in the process ofbegging, borrowing, and actuallybuying some of these for thoroughtesting and debugging.

Since I strongly feel that it is flatout not possible to properly review

any laser printer without spendingsix months while shoving 60,000copies through the machine in a realend-user environment, this maytake a while. And several printerbuilders seem less than totally eagerto have all of their wares honestlyreviewed. Especially those not nowusing Canon engines. But do stay

tuned here for ongoing info.There are lots of new PostScript

products this month. For any of youunfortunates that got snookeredinto those obsolete and dead endTrueType fonts, you could instantlyupgrade these into genuine Type IAdobe PostScript by using a newAres FontMonger product.

Any set of characters from anysource, be it scanned, live video,bitmapped, third party, or handsketched can be rapidly convertedinto first rate PostScript fonts by anextremely powerful and superbquality tool known as the ATF TypeDesigner, and currently availablefrom Kingsley-ATF.

For an interesting extension toHypercard II, check out the HyperPS Tools by Lupin Software. This letsyou send your HyperCard fields asreal PostScript while receiving anddisplaying full feedback and errormessages. A name tag and a buttonprinting demo stack is included.

Adobe Systems has a great new apnote – a complete listing for theJPEG Technical Specification, Revision8. This one shows you all of the keyinsider details needed to compresscolor images. Especially with LevelII. Single copies are available at $15.As usual, nearly all of the sourcesreferenced here appear in the Names& Numbers appendix.

There’s a new Lasersetter OwnersAssociation intended to support highend uses of PostScript. Besides theuser services, they have an on-lineBBS found at (415) 841-6302. Specialthanks to TypeWorld, a great freebietrade journal for this tip.

And the usual reminders herethat there is a great PostScript boardup on GEnie as PSRT. Power userscan use M835 to access this round-table and M836 for the downloadlibrary. A pair of excellent PSRTX-ref and planners are now up asfiles #245 and #246.

I have also got a free PostScript

70.2

ASK THE GURU

Fig. 2 – Two methods to improve toner durability.

BAKERIZINGWith BAKERIZING, your toner image istemporarily placed in close contact witha smooth film. Heat and pressure is thenapplied. The toner becomes much blackerand takes on a beautiful medium to highgloss. Some films can be reused.

With LAMINATING, a thin clear plasticoverlay is permanently attached to yourcopy by using heat and pressure. Thisprocess seems ideal for menus and bookcovers, or where extreme scuff resistanceto "lock in" your toner is required.

LAMINATING

Insider Secrets mailer waiting foryou should you call or write per theend blurb. Also note our ongoingno-charge PostScript helpline.

Speaking of which, by far thehottest helpline topic these days in-volves those of you asking…

Just What is So AwesomeAbout PostScript Level II?

PostScript Level II is the neweststandard in desktop publishing, andoffers several really exciting newfeatures. I’ve summarized some ofthese in figure one.

The good news is that the new 800page "Red Book II," and otherwiseknown as the PostScript LanguageReference Manual, second edition hasfull details on all the new Level IIstuff, as well as for old PostScript,Display PostScript, EPS files, andthe party-line document structuringconventions. The bad news is thatthe book is so awesome that it scaresaway beginners who just want toknow a little about a few of thesimpler PostScript commands.

At any rate, the Red Book II costsaround $29 and should be availablein your local bookstore. I also stockthese as a service for you ComputerShopper readers.

I still can not reveal any precisespeed results, but do stay tuned. Intheory Level II should end up muchfaster than earlier versions, owingmostly to new techniques learned inthe process of developing DisplayPostScript. And Level II will oftenbe associated with RISC chips orco-processor speedup devices foreven more speed.

On the other hand, many userstoday needlessly insist on severelybaud rate limiting themselves. Mostespecially those PC users. PostScriptexecution speed is totally meaning-less if your comm with your printershould end up baud rate limited.Improved resolution can also costyou dearly on print speeds. Someoperations at 1200 DPI take sixteentimes longer than at 300DPI. Thus,many printer designs may opt togive you a little extra resolutioninstead of a lot more speed.

There are zillions of secondary

refinements in Level II, that pickedup all of those goodies added on acatch-as-catch-can basis along theway. A lot more memory is nowdynamically allocatable, so dictfullerrors are now a thing of the past.Repeated fine lines can now be donefar more uniformly through a newstrokeadjust feature. And garbagecollection to reclaim VM is now fareasier and more powerful.

Two major new features that Ihave yet to explore are the uniquebinary encoding formats, which letyou both store and communicateprograms in vastly smaller space;and high end color enhancementswhich very greatly improve colorseparation and printing.

In the past, if you wanted toemulate something, you wrote yourown emulator and then persistentlydownloaded it. Naturally, sincePostScript is so incredibly powerful,it can emulate virtually any olderprinting format. Level II now addswhat Adobe calls filters to the inputand output communications and

disk channels. You can think of afilter as a universal emulator.

There are some really excitingnew filters. But by far the mostprofound of these is a fax filter thatdirectly lets your PostScript printersend and receive top quality fax.

In fact, PostScript Level II cancompletely and ludicrously blowfax out of the water. A test can bemade to find out if the other end is aquaint and outdated fax machine ora sleek new Level II printer.

If a quaint oldie, the image getssent at fax speed and resolution.Even here, the results will be muchbetter than your usual scanned faximages. If a Level II printer, yourimage is instead transmitted asdevice-independent PostScript.

Which means that you can nowsend top quality camera ready art toarbitrarily high resolution and do sofaster and cheaper than you couldsend a grubby old fax image. Anddo so anywhere in the world.

One more time: With Level II, youcan now transmit camera-ready color

70.3

June, 1991

Fig. 3a – PostScript stock history investment analyzer…

% Copyright c 1991 by Don Lancaster and Synergetics, Box 809, Thatcher AZ, 85552. Any and all% commercial rights reserved. Personal use permitted so long as this header remains present and% intact. LaserWriter Secrets book+disk $29.50 VISA/MC. Free voice helpline (602) 428-4073. Full% code and docs available on GEnie PSRT library #221 GENIEVST.PS and #223 GENIEVST.TXT.

% This PostScript-as-language routine will take any GEnie log that has a stock history dump in% it and then return to your host a detailed investment analysis model of that stock history, simply% by following selected arbitrary and fully programmagle buy-sell rules of your choice.

% WARNINGS: The only warranty, express or implied is APPROXIMATE QUANTITY ONE. Use% beyond a "fun with numbers" game is at your own risk. A two way RECORDABLE comm setup is% ABSOLUTELY ESSENTIAL for this PostScript program. Parallel ports need not apply.

% There is purposely no graphic output here, although the graphical extensions that are possible% totally boggle the mind. Extensive comm delays have been included for host viewing and% recording. Eliminating these very much speeds things up. Everything is programmable.

% CURRENT RULES: sell on sellrise above closing; buy on inverse sellrise minus bidask below% closing. Buy in hundred lots at or above buysize. Pay commissions, allow for OTC bid/ask,% and dual rate interest. Interest calculations are approximate. Ignore taxes and capital% gains cutoff. No short positions or dividends. Change agressiveness with market.

% USER VARIABLES

/percent {0.01 mul} def % allow comissions as percentage/initialcash 10000 def % initial cash balance/buysize 10000 def % approx buy purchase size (fixed for now)/commission 1 percent def % comission on a buy or sell (can be fancy proc)/bidask 0.25 def % bid-ask spread if OTC/sellrise 33 percent def % sell on this rise; buy on inverse drop - bidask/closeonly true def % use only closing prices?/currentcash initialcash def % initialize cash balance/currentstock 0 def % initial stock balance/interest+ 8 percent def % interest rate for positive cash balance/interest- 10 percent def % interest rate for negative cash balance/showinterest true def % show daily interest to host?/showdailyreport true def % show daily reports to host?/totaldays 1000 def % more than number of days analyzed/sharesheld 0 def % no shares to start/maxshares sharesheld def % start with zero/worstcash initialcash def % start with initial/worstmarket initialcash def % same/bestmarket initialcash def % same/interest 0 def % running variable/initialdelay true def % host turn around delay? (for IIe)/guessmarket true def % try and second guess economy?/lowtrip 23 def % minimim "normal" price range/hightrip 35 def % maximum "normal" price range/hiloadjust 25 percent def % agressive/conservative factor

% SERVICE ROUTINES

% grabvalue grabs the data needed as strings in arrays. In this example, we want characters 0-5% read as a GEnie date, 6-12 read as the stock volume, 13-21 read as the daily high, 22-30% read as the stock low, and 31-40 read as the stock closing price/grabvalues {{str dup 0 6 getinterval cvi datearray exch aindex exch put dup 6 7 getinterval cvivolumearray exch aindex exch put dup 13 10 getinterval cvr higharray exch aindex exch put dup 2210 getinterval cvr lowarray exch aindex exch put dup 31 10 getinterval cvr closearray exch aindexexch put pop /aindex aindex 1 add def}if} def 300 string /buffer exch def

% report returns values to the host and provides an optional time delay/report {print flush 50 {37 sin pop} repeat} def /r1 {( ) cvs report} def

% grabtoday gets the current array values for this date/grabtoday {/datetoday datearray today get def /volumetoday volumearray today get def /hightodayhigharray today get def /lowtoday lowarray today get def /closetoday closearray today get def} def

% sumshares goes through the holdlist and totals the shares/sumshares {/sharestoday 0 def 1 1 lastbuy { holdlist exch get /sharestoday exch sharestoday adddef} for /sharevaluetoday closetoday sharestoday mul def} def

% reporttoday reports the days activities back to the host .../reporttoday {sumshares showdailyreport {(date: ) report datetoday r1 (r) report (shares held )report sharestoday r1 (r) report sharestoday dup maxshares gt {/maxshares exch def}{pop} ifelse(shares value: $) report sharevaluetoday r1 (r) report (cash held: $) report currentcash r1r) report(market value: $) report sharevaluetoday currentcash add r1 (rr) report (next buyat ---> $) reportbuyat r1 (r) report (next sellat --> $) report sellat r1 (rr) report} if currentcash dup worstcash lt{/worstcash exch def}{pop} ifelse sharevaluetoday currentcash add dup dup worstmarket lt{/worstmarket exch def}{ pop} ifelse dup bestmarket gt {/bestmarket exch def}{ pop} ifelse} def

listing continues as figure 3.b … �

separations and any final prepress artfaster, cheaper, and more convenientlythan using traditional fax!

The other filters are also quiteimpressive. There’s a JPEG filter tocompress high quality color imagesby as much as 100:1. A new ASCII85filter can replace the old hex-ASCIItransmission standard but is nearlytwice as efficient. Several personalcomputer compaction filters areavailable, including TIFF. Plus plainold run length encoders similar tothe previously secret one used forcacheing larger sized fonts.

Mercifully, the obscene font pathlockout on pathforall has at long lastbeen flushed. Most font paths arenow instantly grabbable on Level IIfor such things as custom logos andnon-linear transformations. Amenbrudder. Hallelujah!

A unique new forms capabilitydramatically speeds up many jobs.It is sort of a super step-and-repeat.You can actually cache your entireform as a bitmap or as a compactrunlength file and quickly reimageit as often as you like. The first timeyou image the form it images up inthe usual manner. But at the sametime a bitmap or else a runlengthencoded copy goes into a cache forreuse. The reuse can be hundreds tothousands of times faster. Amongother things, this should bypass thelack of a duplex copypage that is sohorribly crippling the IId and IIIddouble-sided printers.

There’s also a new feature calledUser Paths. These are sort of likeforms in that your first use of anyPostScript proc that you want toreuse also gets cached. This is verysimilar to the proc cacheing stunts welooked at in previous issues, but farmore convenient.

Presumably, the Level II upgradechips should be made available formost existing PostScript printers.Stay tuned for price, performance,and speed comparisons.

How Can I MakeToner More Durable?

I have long been saddened bytoner being far less durable and notnearly as pretty as real ink. So much

70.4

ASK THE GURU

Fig. 3b – …PostScript stock history analyzer, concluded.…

% buy first decides which price to use. That price plus bidask is rounded to the narest 100% shares above buysize and goes into the holdlist. The holdlist pointer advances% The cost of the shares plus the commission is subtracted from currentcash/buy {closeonly {closetoday}{lowtoday} ifelse bidask add /carryprice exch def buysze carryprice div100 div ceiling 100 mul /numshares exch def /currentcash currentcash numshares caryprice mul dupcommission mul add sub def /buyat carryprice sellrise 1 add div bidask sub def /selat carrypricesellrise 1 add mul adjustsellat def /lastbuy lastbuy 1 add def holdlist lastbuy nushares put sellatlistlastbuy sellat put reporttoday (r============r) report (BOUGHT ) report numshaes cvi r1 ( sharesat $) report carryprice r1 (rr) report grabtoday reporttoday /numbuys numbuys 1add def} def

% sell sells the last stock, pays a commission, credits currentcash, and reports ../sell {lastbuy 0 gt {holdlist lastbuy get /numshares exch def /lastbuy lastbuy 1 sb def /sellat sellatlistlastbuy get def closeonly {closetoday}{hightoday} ifelse /saleprice exch def salepice numshares mul1 commission sub mul /currentcash exch currentcash add def saleprice sellrise 1 ad div bidask sub/buyat exch adjustbuyat def lastbuy 0 eq {sellatlist 0 sellat put } if (r===========r) report (SOLD )report numshares cvi r1 ( shares at $) report saleprice r1 (rr) report grabtody reporttoday /numsellsnumsells 1 add def}if} def

% summaryreport summarizes the total trading sessions for the history/summaryreport {(rr) report (maximum shares owned at one time ----> ) report mxshares r1 (r) report(best market value at any time -------> $) report bestmarket r1 (r) report (wrst market value at anytime ------> $) report worstmarket r1 (r) report (worst cash position at any tme -----> $) reportworstcash r1 (r) report (total completed trades --------------> ) report numsels cvi r1 (r) report(remaining open buy positions ---> ) report numbuys numsells sub cvi r1 (r) reort (rr) report} def

% gottoend? decides when you are done scanning the currentfile./gottoend? {dup (%!!%) search {pop pop pop exit }{/str exch def validate grabvales} ifelse} def

% validate throws out incorrectly formatted lines. This example uses a 71 charactr line% with spaces in locations 5, 60, and 67, and a valid number in locations 4, 59, nd 66./validate {pop str length 47 eq {true}{false} ifelse {str 6 get 32 eq str 13 get 3 eq and str 22 get 32 eqand str 5 get dup 0 48 add ge exch 9 48 add le and and str 12 get dup 0 48 add ge xch 9 48 add leand and str 21 get dup 0 48 add ge exch 9 48 add le and and }{false} ifelse} def

% guessmarket tries to decide whether today’s stock is "high", "low" or "normal" nd makes% you more aggressive at low times, more conservative at high times./adjustbuyat { guessmarket {closetoday lowtrip lt {hiloadjust sellrise mul 1 add dv} if closetodayhightrip gt {hiloadjust sellrise mul 1 add mul} if} if} def /adjustsellat {guessmaket {closetoday lowtriplt{hiloadjust sellrise mul 1 add mul}if closetoday hightrip gt{hiloadjust sellrisemul 1 add div}if}if} def

% MAIN GRABBER LOOP

% analyzestock is the main outer loop that scans the input textfile, strips out dta values,% creates numeric arrays of those values, and then analyzess the results./analyzestock {save /snap exch def totaldays dup array /datearray exch def dup arry /volumearrayexch def dup array /higharray exch def dup array /lowarray exch def dup array /clsearray exch defpop /aindex 0 def currentfile {dup buffer readline {gottoend?} {exit} ifelse } loo pop pop datearray 0aindex getinterval /datearray exch def volumearray 0 aindex getinterval /volumearry exch defhigharray 0 aindex getinterval /higharray exch def lowarray 0 aindex getinterval /owarray exch defclosearray 0 aindex getinterval /closearray exch def initialdelay {2000 {37 sin po} repeat} ifdoanalysis snap restore } def

% STOCK INVESTMENT ANALYSIS PROCESSING CODE

% doanalysis takes the values in datearray, volumearray, higharray, lowarray, andclosearray% and models an investment strategy following your selected rules .../doanalysis {300 array /holdlist exch def 300 array /sellatlist exch def /lastbuy def holdlist lastbuy 0put sellatlist lastbuy -99999 put /today 0 def /buyat 999999 def /sellat -999999 df /numbuys 0 def/numsells 0 def /oktoselltoday true def grabtoday buy 1 1 aindex 1 sub { /today exh def grabtodaylastbuy 0 ge {closeonly {closetoday}{hightoday} ifelse sellrise 1 add div bidask sb adjustbuyat dupbuyat gt {/buyat exch def showdailyreport {(buyat ^ to $ ) report buyat 100 mul ound 100 div r1 (r)report } if}{pop} ifelse} if closeonly {closetoday}{lowtoday} ifelse buyat le {buy /oktoselltoday falsedef} if oktoselltoday {closeonly {closetoday}{hightoday} ifelse sellat ge {sell} i} if /oktoselltoday truedef currentcash 0 gt {interest+}{interest-} ifelse 250 div currentcash mul /interst exch def/currentcash currentcash interest add def showinterest {(Int: ) report interest 00 mul round 100 div r1(r) report } if} for (r================) report (r) report (TRADING SUMMARY) report (rr) report/showdailyreport true def reporttoday summaryreport} def

% Your stock history file gets inserted below, immediately following the -analyzetock- command,% but before the required %!!% marker. Usually, your ENTIRE GEnie log can be used

analyzestock % this one line does it all!

DATE SALES HIGH LOW CLOSE AMOUNT TYPE

890102 1440 25.000 24.500 24.500 --890103 1474 25.000 24.500 24.500 -- --- stock history to be analyzed goes here ---910301 7180 48.000 46.500 46.750 --

%!!% % required markerquit

so that I have finally decided to dosomething about it. I have beenworking very closely with two filmconversion houses to come up witha pair of new products that verydramatically can improve both theappearance and durability of laserprinted toner hard copy. And do soat an acceptably low end user cost.

The first of these is called GollyGee Mister Science Bakerizing Filmand is shown you in figure two. Ifyou place a toner image in contactwith an ultra smooth surface andthen apply heat and pressure, analmost magic improvement takesplace. What happens is the tonerremelts and conforms to the ultrasmooth surface. The result is a solidultra-dense black image having amedium to high gloss.

Besides looking much better, thenewly Bakerized image is far moredurable. The process is related tothe ferrotype drum pass that makeshigh gloss photo prints when usingtraditional darkroom techniques.The technical term for what is hap-pening is calandering. You simplywill not believe the quality upgradethe first time you see it. One stun-ned old-line printer recently said itlooked almost like engraving.

To Bakerize, just put your tonerhard copy in the GGMSBF carrierand then either (1) Route it backthrough your copier or laser printerwhile imaging a blank copy; (2)Shove it through an Omnicrom orKroy Color machine; or else (3) Justiron it through a muslin pressingcloth or other thin fabric.

What’s really amazing is thatBakerizing is essentially a zero costprocess. Some films can be reusedmany times. I’m still searching forthe best GGMSBF compromise be-tween reuse and cost.

Bakerizing is absolutely ideal forbusiness cards, for announcments,letterheads, and point-of-sale signs.But it can end up a tad excessiveand overbearing if used routinelyon any large blocks of ordinary finerprint text.

The second new magic material isknown as Golly Gee Mister ScienceLaminating Film, and is also shown

70.5

June, 1991

you in figure two. This film places athin low gloss plastic overcoat ontop of your hard copy, locking thetoner inside. The effect is vastlymore subtle and better looking thantraditional plastic laminating fromthe office supply store. Durability ishigh and the glare can be low.

Obvious uses for the laminatingfilm are for menus, booklets, andbook covers, especially any of thosepublished on a Book-on-Demandbasis. You can use the GGMSLF thesame way you do the Bakerizingfilm, except that the entire film sheetgets permanently bonded to thesurface of your hard copy. The feedsheet and edges are trimmed awayas needed.

Yes, you can Bakerize and thenlaminate for the ultimate in gloss,blackness, and protection. It justtakes longer to do, that’s all.

At this writing, the costs have notyet been finalized, but I hope tokeep things on the cheap. Mostly byeliminating several tiers of marketdistribution. You can write, call, orGEnie [SYNERGETICS] email me for some free evaluation samples andpricing. I’d also like your help withongoing end user testing.

Whaddya Mean ICan’t Have Blue?

We might call this one BizarreLaser Printer Experiences #349. Let’sstart with the bottom line: There area lot of materals you could shovethrough a laser printer. Some ofthem will always work. Others willnever work. And yet others…

We’ve seen how tyvek sleeves orunsupported acetates are absoluteno-nos, and how most laser printed envelope quality sucks and shouldcontinue to do so until such time asthe envelopes are redesigned as asingle thickness that is specificallyintended for laser printing. And wehave seen that plain old offset paperis cheap, opaque, and looks greatfor Book-on-Demand uses.

We have also seen how most ofthe parchments print beautifully forawards and certificates, although afew of them are just plain too greasyto accept toner. And how certain

thicker materials will feed just fine,but others will jam badly.

I’ve long been enamored of thosegreat Die-O-Perf die cut products,especially their PM response cardauto-mailers. Well, recently, myivory brochures would laser printjust fine, but the blue ones wouldmisfeed often enough to end upunacceptably costly and frustrating.While these materials measuredidentical in thickness and felt thesame, you could actually hear thedifference as they fed through theregistration assembly. Swish versusskloosh. While a fresh leading edgetrim cut sometimes helped, it wasdefinitely not a cure.

Die-O-Perf was certainly morethan helpful, but you couldn’t reallyexpect them to strongly support aproduct that was misapplied in anunintended use. Their hint to makesure you feed the non-perforatededge first would be a good one formost users. But I’m running on aduplex IID, and there is no leadingedge, since a die cut form reversesitself in the switchback path.

The cure? Switch from the blueones over to the gold ones. Nobodyseems to know why, nor how longthis problem will remain.

So, experiment all you like withprinting materials. But recognizethat those products which are notspecifically laser rated might oftencause unexpected problems monthsor even years into use.

Two additional sources of severalinteresting materials that may ormay not end up laser printable arePaper Plus and Paper Direct.

What is This Month’sPostScript Utility?

As we’ve seen a number of timesbefore, PostScript is a totally generalpurpose language that can easilyhold its own against any and all themodern contenders. To refer toPostScript as a "page descriptionlanguage" is a gross and demeaninginsult roughly comparable to callingUNIX a "checkbook balancer."

To prove this, I set out to write asuper heavy duty and incrediblypowerful PostScript utility that has

nothing whatsoever involved withputting any marks upon any pages.Yes, you could do the same thing inC or BASIC, but I found that writingin PostScript was far easier, a lotmore fun, and considerably moreflexible than using any of thosetraditional languages.

Not to mention being fully deviceindependent. This code runs on anyhost computer without mods.

And, should you chose to, thegraphical extensions you could add to this program can be positivelymind-boggling. I purposely left anygraphics off to prove a point.

Since use of this program caninstantly make you filthy rich, wealso do have to add the followingdisclaimer: The only warranty here,expressed or implied for what is tofollow, is approximate quantity one.Any use of what follows beyond a"fun with numbers" game is solelyat your own risk. Although I didpersonally profit immediately thevery first time I ran the program,simply by correcting some stupidmistakes I’d been making.

What we have here is a stocktrading analysis package that I callGENIEVST.PS. You throw any oldstock history at it, and it applieswhatever trading model you like tothat history, reporting your profitsand losses back to your host forrecording and analysis. Key parts ofthe PostScript code listing appear infigure four, while excerpts from asample trading session is shownyou in figure five. You can also getthe listings ready-to-run, betterdocumented, and in a more "open"form as GEnie PSRT #221 and #223.

There are two portions to thiscode. The first portion takes a stockhistory from a data base or wordprocessor format and converts itinto internal data arrays. And thesecond portion applies the tradingmodel to those arrays, followingany set of trading rules per yourchoice. Naturally, the best way totest a trading model is to run it firston target stock histories.

PostScript is great at formattingtext, so your input stock history canbe in pretty near any database or

70.6

ASK THE GURU

Fig. 4 – Excerpts from a typical trading session.

BOUGHT 500 shares at $24.75

date: 890102shares held: 500shares value: $12250.00cash held: -$2498.75market value: $9751.25

next buyat ---> $18.36next sellat --> $32.92

Int: -1.0buyat raised to $21.93

BOUGHT 500 shares at $21.00BOUGHT 700 shares at $15.75SOLD 700 shares at $22.75SOLD 500 shares at $30.25SOLD 500 shares at $36.38BOUGHT 300 shares at $36.75SOLD 300 shares at $46.50BOUGHT 300 shares at $35.50BOUGHT 400 shares at $30.25BOUGHT 500 shares at $22.25SOLD 500 shares at $33.00SOLD 400 shares at $40.25SOLD 300 shares at $43.75================TRADING SUMMARY:

date: 910301shares held: 0shares value: $0.00cash held: $37822.00market value: $37822.00

maximum shares owned at one time ----> 1700best market value at any time -------> $37822.00worst market value at any time ------> $1837.02worst cash position at any time -----> -$24513.0total completed trades --------------> 7remaining open buy positions --------> 0

textfile form. In this example, we’veused the normal GEnie stock historydownload format. The filtering inthe code is so good that you cansimply throw your entire GEnie logfile session at it, and it will auto-matically fish out the stock historyand throw everything else away.

In this specific grabbing example,my PostScript validate proc ignoresany textfile lines that are not 71characters long, do not have spacesin locations 5, 60, and 67, or holdvalid numbers in locations 4, 59, and66. This rejects unwanted lines.

The trading model can be nearlyanything you want it to. In thisexample, we are buying in hundredlots, dollar cost averaging, sellingon a sellrise percentage increase andbuying on an inverse sellrise drop.Should a stock wander below its"normal" trading range, you getmore aggressive over buying andless eager to sell. Similarly, getabove the "normal" trading range,you sell more and buy less.

A variety of report formats isavailable, depending on the detailyou need. You can also easily addfancy charts and graphs if you wantto. At present, the host-reportedresults are intentionally sloweddown to a good reading speed. Youcan dramatically speed things up ifyou really care to.

All of this is handled with simplepocket calculator arithmetic easilydone by PostScript. A dual interestrate is used, a low one for surpluscash and a higher one for borrowedfunds. Everything is fully program-mable, so you can easily rearrangethe scenery to suit yourself.

Oh, yes. You do need a two-wayand recordable comm setup on yourPostScript printer for this programto work. Use Applewriter [esc]-R onthe IIe, SendPS on a Mac, or serialXtalk or ProComm on a PC. Needlessto say, you should NEVER use anyparallel port with PostScript, since itblindfolds you and ties both of yourfeet together. Really dumb.

The first thing to try with yourmodel is to decide to become moreconservative and far less greedywhile accepting lower percentage

returns. Select a sellrise value of 4percent and see what happens. Verysimply, you will get taken to thecleaners. At one point you end updown by $140,682.00 and owe nearly$15,000.00 in comissions. Thus, bynot being greedy enough, your riskfactors and commissions skyrocketfor only a modestly higher return.

My first use of this code drovehome the fact that larger and longerterm gains are the ones to shoot for,since they are vastly more profitableto you at far lower risk.

The astounding result: If you arenot greedy enough, you’ll lose andlose bad in a stock trading program.I suspect this has to do with there

normally being more "power" or"energy" in those lower frequencycomponents of any complex wave-form, random or otherwise.

This is an extension to the matchedfilter techniques we looked at in my Incredible Secret Money Machine.

Oh yeah. The particular stockanalyzed in figure five is good oldAdobe Systems. With an optimumanalysis strategy, I’ve found ADBEto consistently yield at least a 70percent annual return, year in andyear out. Plus dividends. Some ofmy other current favorites includeSGAT, CHPS, AAPL, ASA, or, if youare interested in quite high riskbottom feeding, CKP. ❆

Don Lancaster’s

ASK THE GURUJuly, 1991

The latest printer introsMac LC monitor optionsWorking with limited vmA PostScript menu justifyNetworking laser printers

71.1

Fig. 1 – Workarounds for limited VM PostScript printers.

1. Always do a fresh boot when running fat code. Put nothing in the machinethat you do not need.

2. Minimize the number of downloaded fonts. Do not download any font youare not actually using. Fake italics by leaning the normal font.

3. Limit persistent downloads to only those tools you actually need. Trim anyexcess fat off those tools.

4. Avoid using re-entrant code. Code that wrongly calls itself is a major causeof beginner vm blowups.

5. Use extensive save-restore bracketing. The usual method is…

save /savesnap exch def your stuff savesnap restore

The two main invalidrestore causes: (1) failing to have a save object onthe top of the stack, and (2) leaving any new dictionaries open.

You can also nest save and restores to break up something that needs lotsof vm into several somethings that only need a fraction as much.

6. Use vmstatus command every now and then to measure your limits.

7. Arrays (8 bytes per element), Dictionaries (20+ bytes per key pair) andStrings (1 byte per element) gobble up vm. Minimize their sizes.

8. Whenever possible, reuse a dictionary, array, or string.

9. Note that the put command usually rewrites an old definition, while the defcommand creates a new one.

10. If a deferred proc has too many elements for the stack, the usual cure is todo a (all the proc stuff) cvx exec. The string can be up to 64K long.

11. The ADOBE DISTILLERY inherently uses lots of vm. Distill single pagesrather than whole documents.

12. If at all possible, put extra memory into your printer. Most SCSI hard disksystems blow up at 2 Megs, but work fine at 3 Megs.

13. If only a few special font characters are needed, grab the specific fontpaths, rather than using an entire font definition.

14. Be willing to test and experiment to get at the problem.

Let us shout this one from therooftops – That Apple IIgsRGB color monitor A2M0014

absolutely, and positively can NOTbe used with your Mac LC. Whichcould add as much as another $1000into your changeover costs.

Those IIgs monitors operate atnormal television horizontal scanfrequencies of 15735 Hertz, whilemost newer color computer systems

do require a substantially higherhorizontal scan rate.

Yes, the connectors are the samesize and shape. But the connectorpinouts and the scan frequencies aretotally different. And hardwaremodifying the horizontal scan rateof a color monitor is both a hor-rendous and dangerous job.

You can use a VGA color monitorwith your LC by going to a special

cable. But, since the quality and theresolution of these vary all over thelot, do be certain you see what theactual LC output looks like beforeyou buy one. We may look at theVGA cable in a future column.

The LC does seem to be sellingquite well. Already, there are newsoftware patches that can let yourun Excel, as well as plug-in cardsthat upgrade you to the 68040 andthe math co-processor found in allthe bigger Macs.

At this writing, though, Apple isstill not shipping their Apple IIecard for the LC. And I still have ahollow feeling that this card will notrun AppleWriter. Especially for anytwo-way LaserWriter comm at a59,600 rate. Or in the modem recordmode. Stay tuned on this.

There are also still rather seriousproblems with Apple mailing listrentals. Particularly their Laser-Writer printer user list. ApparentlyApple simply refuses to admit howbad they are being taken by theirthird-party list brokers. My testingof the "new" and "improved" listshowed that it was never cleaned, isnot being maintained, and is utterlyancient. The nixies were apalling.And the response to a well testedmailer was zero.

If you do rent an Apple list, besure to run the smallest possible testinto your tightest possible targetmarket. Even then, expect a lousyresponse. And be certain to get awritten guarantee that includes thedate of the last list cleaning.

A big thanks to Hewlett Packardfor all the technical data they havebeen sending me recently. H-P doeshave a Peripherals ISV/IHV programsimilar to being an Apple or Adobedeveloper. You might contact themper the Names and Numbers sidebarfor more details.

Our usual reminders here that wehave this great Guru and PostScriptBBS up on GEnie as PSRT, and you

71.2

ASK THE GURU

Fig. 2 – A precise menu justify example.

Mitzi’s Yuppy FareMitzi’s Yuppy FareMitzi’s Yuppy Fare

. . . . . . . . . . . . . . . . . . . . . . . . Knockwurst A La King $3.27

. . . . . . . . . . . . . . . . . . . . . . . . Hot Clam Sundae $1.15

. . . . . . . . . . . . . . . . . . . . . . . . Coconut Anchovy Pizza $8.35

. . . . . . . . . . . . . . . . . . . . . . . .

$1.25

Butterscotch Pudding au gratin $1.25

. . . . . . . . . . . . . . . . . . . . . . . . Oat Bran Flambe’ $2.95

. . . . . . . . . . . . . . . . . . . . . . . . Twinkie Kabobs $1.65

. . . . . . . . . . . . . . . . . . . . . . . . Pastrami & Kiwi Blintz $4.50

. . . . . . . . . . . . . . . . . . . . . . . . Sopapillas, Enchilada Style $2.46

. . . . . . . . . . . . . . . . . . . . . . . . Grape Chili au jus $4.45

. . . . . . . . . . . . . . . . . . . . . . . . Avocado & Liver Surprise .15

. . . . . . . . . . . . . . . . . . . . . . . . Chocolate Sushi $25.50

can get your voice connect info via(800) 638-9636. You could also reachour no-charge Ask the Guru voicehelpline per the appendix. And wenow do have both the Ask the GuruIII and LaserWriter Secrets reprintsfreshly updated.

And, of course, I still have a freePostScript Insider Secrets brochurewaiting for you whenever you callor write.

What is new inPostScript Printers?

There’s a bunch of brand newPostScript laser printers fresh outfrom H-P, Apple, QMS, and others.And I will certainly be testing someof them on a long term basis for allyou Ask the Guru readers. But, sightunseen, I am sorely disappointedwith the entire lot. In fact, I’ll callthis sorry batch the "lost generation"of PostScript printers.

PostScript level II is as stunningan improvement over PostScript asPostScript was over everything else.But not one of this current crop usesit! At least not yet. To me it makesfar more sense to go with what youhave or else pick up some oldermachine now, and then get a goodone when Level II becomes widelyavailable. For level II will surely ob-solete anything earlier.

Besides much faster speed, levelII includes a full fax capability. Theprogramming details are in the newred book II, which I now do have instock for you. Word has it that thefirst actual level II machine will be aQMS color job that should be out"real soon now".

One very positive feature of someof the new printers: Duplexing, ordouble sided printing, is apparentlygoing to become a low cost ($600list, $400 street) bolt-on option. Aswe have seen, a duplex printing isessential for any Book-on-Demandpublishing, and extremely handyotherwise. Fun, too.

Making duplexing a low pricedoption to a high volume machinemakes far more sense than using aseparate model. As with earlierprinters, you don’t really print onboth sides at the same time. You

print one side, grab the sheet androute it back through a switchbackassembly and then print the otherside on the second pass.

That HP IIIsi probably has thehighest profile of the new machines.Wide open, it runs at 17 pages perminute and uses new double lifecartridges having a microfine andultra black toner in them. It also hasthe new resolution enhancementtechnology, which is a simple dotmodulation that can dramaticallyimprove certain forms of 300 DPIoutput. Both a duplex bolt-on and afull internal Adobe PostScript areavailable as options. A fast RSICchip is used.

But I can see several good reasonsfor not jumping out and buying aIIIsi just yet. It is definitely not levelII and uses the same old wimpyPostScript 52.2 of those earlier car-tridges. Complete with lousy serial

comm and a copypage that is not sidesensitive in duplex mode.

And no, you can NOT use anyexisting PostScript cartridge withthis machine, since the CPU is nolonger Dr. Moto.

Appallingly, there is no SCSI harddisk support for font cacheing, fontstorage, or even for any Book-on-Demand production. Which seemsan utter and total absurdity in ahigh end 17 PPM PostScript printer.

To the possibly fatal flaws of nolevel II and no SCSI disk or comm,we can add several obvious minorones. It will take the rechargers awhile to get cheap reloads for thismachine. In an ugly new surprise,an improperly formulated microfinerefill toner can explode.

The earliest sources of low costrefills are likely to appear as ads inRecharger magazine.

The IIIsi street price is certain to

71.3

July, 1991

Fig. 3 – Excerpts from my gonzo menu justify routines.

% Copyright c 1991 by Don Lancaster and Synergetics, Box 809, Thatcher AZ, 85552. Any and all% commercial rights reserved. Personal use permitted so long as this header remains present and% intact. LaserWriter Secrets book+disk $29.50 VISA/MC. Free voice helpline (602) 428-4073. Full% code and docs available on GEnie PSRT library #276 MITZIYUP.GPS, #220 GUTIL13A.PTL,% #219 GONZO13A.PTL, and #220 GONZO13A.TXT. Free printed copies on request.

% Note: This code DEMANDS persistent downloads of GONZO13A.PTL and GUTIL13A.PTL

gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} binddef /cw {save /snapc1 exch def /oktoadvance false def /oktoadvance false def /linestring linestring2def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} defend

/menudots (. ) def /menufont {font1} def /mdoteht 3 def /menudelim ( ) def /cropleadingspaces truedef

/drawmdots { gsave menufont xxm yym moveto txtwide menudots stringwidth pop dup /mdot1 exchdef div floor cvi {menudots show} repeat grestore } def

/spchomp {cropleadingspaces {dup 0 exch {32 eq {1 add}{exit} ifelse } forall} if exch dup length 2index sub 3 -1 roll exch getinterval} def

/mlineproc {mline length 0 gt {drawmdots mline menudelim search {/lmstr exch def pop spchomp/rmstr exch def } if gsave 1 setgray xxm yym moveto mdoteht setlinewidth 0 0 lmstr cw mdot1 divceiling mdot1 mul 0 rlineto stroke xxm txtwide mdot1 div floor mdot1 mul add yym moveto 0 0 rmstrcw mdot1 div ceiling neg mdot1 mul 0 rlineto stroke grestore xxm yym lmstr cl xxm txtwide add yymrmstr cr /yym yym yinc sub def} if} def

/cm {gsave /msg exch def /yym exch def /xxm exch def {msg ( \ n) search {/mline exch def pop /msg exch def mlineproc} {/mline exch def mlineproc exit } ifelse} loopgrestore} def

% //// demo - remove or alter before reuse. ////

gonzo begin gutility begin /txtwide 240 def /cstretch 0.1 def /sstretch 0.5 def /yinc 26 def /font1/Palatino-Roman 12 gonzofont /font2 /Palatino-Italic 12 gonzofont font1

125 365(Knockwurst Ala King $3.27Hot Clam Sundae $1.15Coconut Anchovy Pizza $8.35Butterscotch Pudding |2au gratin|1 $1.25Pastrami & Kiwi Blintz $4.50Sopapillas, Enchilada Style $2.46Grape Chili |2au jus|1 $4.45A|kvocado & Liver Surprise .15Chocolate Sushi $25.50) cm

showpage quit

drop after all the dust settles. Andbunches of other new machines areabout to be released.

But these are all my first "sightunseen" impressions. We’ll mostdefinitely be seeing lots more on theIIIsi as it currently seems to be run-ning away with all the marbles.

Can a PostScript PrinterBe Used on a Network?

Well, I certainly don’t think so.And I have no idea where such anoutlandishly silly myth could everhave started.

As we have seen several timesbefore, if you cannot reach out andphysically touch your PostScriptprinter from your work station, itsusefulness to you will drop dra-

matically. Several of the obviousreasons for this include paper jams,stock selection, quality monitoring,cartridge refilling, laminating, den-sity adjustments, Bakerizing, harddisk or shared SCSI comm access,envelopes, control of any persistentdownloads, error debugging, VMmanagement, etc…

With the big exception of displayPostScript, what you see on yourscreen is probably not what you willget on your page. So you do have toactually look at your final copy to becertain it is what you expected.

More important, PostScript is atotally general purpose computerlanguage that demands instant andfull two-way recordable host com-munication and interaction. Some

networks (particularly those thatinclude print buffers or servers)either outright eliminate or elseseverely restrict your host returnchannels. Many better PostScriptprograms simply will not run onsome networks. Examples includethe popular Adobe Distillery or myGENIEVST.PS stock analyzer.

Worst of all, a network is oftenused as a lame excuse to buy oneexpensive printer rather than two ormore cheaper ones. There are anumber of very good reasons whytwo cheap 8 PPM PostScript printerswill blow the fusion rollers off oneexpensive 16 PPM machine in mostnetwork environments.

First, nearly all of the time, theoverwhelming majority of networkPostScript users will end up beingseverely baud rate limited. For in-stance, the 57600 baud game pad-dle port of an Apple IIe can sendPostScript nearly four times fasterthan AppleTalk’s 17200 kilobaudeffective baud rate usually found onsmaller Macs.

Baud rate limiting causes a slowprinter or a fast printer to output in precisely the same click-to-clunktime. More often than not, twonetworked 8 PPM printers will endup at least twice as fast as one 16PPM machine.

Second, your typical PostScriptnetwork jobs tend to involve lots ofreally short tasks mixed in with afew very long ones. If a long job isrunning, all of the short ones stillhave to wait. If you have two ormore printers, the long jobs and theshort jobs can all run at the verysame time.

Third, the tasks of multiple cheapprinters can be specialized. You canuse one printer for letterhead andenvelopes only. Or economicallyuse your older or slightly defectivecartridges for any rough drafts andin-house uses.

Fourth and obviously, if you havetwo printers and one goes down forany reason, you can still stay on theair. And still print now.

If you feel you absolutely mustnetwork some PostScript printers,be sure to use a "cluster" or a "star"

71.4

ASK THE GURU

arrangement of your workstations,so that every user can reach out andphysically touch the machine.

Measure your actual comm timesto find out how often and badly youare being baud rate limited by yournetwork. Then do something aboutit, such as switching to shared SCSIcomm at 650,000 baud. Finally, becertain that your network setupdoes not in the least interfere withany PostScript computed results be-ing instantly returned to a host forrecording or display.

How Can I Save VM?Our no-charge PostScript helpline

sure has been getting a lot of calls onthose $995 rebuilds and retrofits ofthe older Canon CX laser printers.Popular sources include The PrinterWorks and Don Thompson.

In general, these "bargains" areremarkably comparable to a $995hot tub. They look good in the adand on the dealer’s showroom, butyou definitely would not want toever put water in one or have any-one actually sit in it.

Bluntly, you get between ten andtwenty times the performance with a$1990 PostScript printer today thanyou can get for $995. The price maybe there, but the bang-for-the-buckdefinitely is not.

The key problems include (1) thefrustratingly slow speeds, (2) vmblowups, and (3) all of the inherentlimitations of host computer basedPostScript. On the other hand, theCX engine does do a better job oncovers and business cards than mostnewer machines.

As of this writing, I strongly feelthat by far the best bang-for-the-buck remains the QMS PS410.

At any rate, there are lots of timesand places where you can run out ofmemory in your PostScript laserprinter. Even though these older CXmachines are the worst offender, ifyou are not careful, you can easilyrun out of memory in any PostScriptprinter of any size.

Figure one summarizes several ofthe tricks you can pull to conservelimited memory, especially on olderor gutless machines.

The available RAM in most anyPostScript printer is usually split upinto four major pieces: A font cache,the framedevice, the system reserve,and virtual memory, or simply vm.Your virtual memory gets used upany time you persistently downloada routine. Or a font. Or anytime youdefine a string, any array, or anydictionary entry.

In early versions of PostScript,there is no "garbage collection" assuch. Except that you can brackethigh memory usage with a save anda restore to recover nearly all thememory needed between the two.In extreme cases, you can even usemultiple saves and restores to tryand reuse the same portion of vmover and over again.

Key secrets to working withlimited vm include doing a freshreboot on any problem code, notdownloading what you do not need,avoiding reentrant code, keepingstrings and arrays and dictionariesas small as possible, and carefullyusing save and restore constructs tocontinually reuse what limited vmyou do have available.

Naturally, if any extra RAM canbe added to your machine, youmight want to do so. Most SCSI harddisk systems tend to be flakey andblow up at 2 megs, but work justfine at 3. And extra RAM is not allexpensive these days.

Good sources for RAM are thoseads in Computer Reseller magazine.

What is This Month’sPostScript Utility?

Every once in a while, some type-setting job comes up that is trivial todo on a plain old typewriter, butseemingly difficult to handle well inPostScript. A good example of thisis a menu justify. In a menu justify,you have a left text message, a rowof dots, and a right text message.Programs, catalogs, directories, andprice lists also will often need amenu justification.

Usually you want your left andright messages to be shown in fullproportional mixed and kernedfonts, but want your dots to remainfixed pitch. Ideally, you want the

spacing and the alignment of thedots to be constant. And you wantwhole dots only.

While simply fill justifying a linewith a bunch of dots in it can work,deciding how many dots to use getstricky and may require more thanone pass. And the decimal points onyour prices may wobble.

Figure two shows you a typicalhigh quality menu justify. Note thatall the dots are precisely verticalaligned and precisely spaced. Thereare no partial dots and no crowdingof any characters. And it all comesdown in one easy pass.

Figure three shows you somesample code. While this is written tomake full use of my Gonzo justifyroutines found on GEnie PSRT (800)638-9636 and in all my Ask the Gurureprints (602) 428-4073, you mighteasily adapt the ideas to any rawPostScript code of your chosing.

The key secret is to put down anyand all possible dots first in all dotpositions. Then you erase all of thedots that you do not want.

When erasing, you carefully eraseonly up to a dot boundary, to pre-vent any partial dots. You do this bymeasuring the actual width of thekerned and mixed proportionalmessage, and then rounding it up tothe next whole dot increment.

If you care to, any character ordingbat of any size could get sub-stituted for a plain old dot.

You only have to enter your leftmessage and right message for eachentry, separated by at least twospaces. Any extra spaces nicely getignored. Forget about entering thedots. They are fully automatic. Veryhandily, the same routine can evenauto-convert ordinary lists from anysource into full menu justification.

Border? What border? Oh, youlike that huh? We’ll save this gemfor some other time. Suffice it to saythat you are looking at a mere 170bytes of raw PostScript that com-pletely blows away most of thoseillustration and drawing packages.Should you want an advance peek,check out our new ready-to-runMITZIYUP.PS on GEnie PSRT, or elsewrite or call me for a free listing. ❆

Don Lancaster’s

ASK THE GURUAugust, 1991

Low volume book publishersThat Apple IIe emulation card

VGA monitors and your Mac LCIncredible Secret Money Machine

A serendipitous PostScript border

72.1

Fig. 1 – My critique of the Apple IIe card for the Mac LC.

1. The IIgs color monitor and most television receiver/monitors can not beused with the LC because of the higher horizontal scan rates.

2. The internal hard drive is not accessible from the IIe side, nor is theexternal SCSI connector. This prevents LaserWriter shared SCSI comm.

3. Network file servers are not accessible from the IIe side, especiallyAppleShare. This is a fatal flaw for most educational users.

4. The first external 3.5 drive apparently must be the obscure, obsoleteand expensive Unidisk 3.5. The regular 800K 3.5 Mac/IIgs drive does notseem to work as the first external drive. At least not for me.

5. Space parity is no longer available, making use of LaserJets and QMSprinters tricky with older unmodified "high ASCII" software.

6. The annunciator outputs are missing from the game paddle connector.These are often used for LaserWriter serial comm at 57,600 Baud, ortwo to four times faster than AppleTalk. PostScript Book-on-demandprinting thus takes much longer on an LC than on a real IIe.

7. Incoming characters are dropped from popular communication programsand PostScript error messages, especially when using color monitors ormultiple gray levels. A slow screen scroll seems to be the culprit.

8. Operating speed in the "fast" mode is somewhat slower than anaccellerated IIe for most uses. For screen intensive operations, thescreen updates are intolerably slow and far more ungainly.

9. Crucial keys, including escape, closed apple, and ctrl are now in wildlydifferent and super klutzy locations. You can, however, redefine somekeys or use a IIgs keyboard. Except for the %$#& caps lock.

10. Printer cables are not generally swappable. The LC usually demands"direct" or "modem" cables, while the IIe usually requires "modemeliminator" or "printer" cables. Connector styles also differ.

11. There are no real slots, preventing such things as quick EPROMprogramming, home power control, speech generation, or any ofhundreds of other creative and innovative IIe uses.

12. Minor gripes: No eject button on internal disk. No "reverse the lid" copystand. Some older copy protection schemes are unreadable. Emulationcard slot assignments seem unnecessarily restrictive.

T he Mac LC does seem to beselling quite well. Severalobvious LC shortcomings are

now getting filled with third partyproducts. For instance, low costmath co-processors that now let yourun Excel and otherwise speed youup are available from Quantum LeapSystems, as the Crunch-It from PSI,QuickMath/LC from Novy Systemsand the Apex by Second Wave Inc.

At the same time, Apple is now

shipping extra regular and videoRAM in its stock LC offerings. Firstfor system 7 and secondly to extendthe colors available to 256.

The really big LC question, ofcourse, is…

How Good is the Apple IIeCard for the Mac LC?

Well, Apple is now shipping theIIe emulation card for the LC. I havehad one for a month now, and have

been thoroughly trying it out. Thebottom line: At the present time, theLC/IIe emulation card is not evenremotely in the same league as areal Apple IIe when it comes toquickly and unklutzedly runningApple IIe software, for accessingnetworked school lab software, forerror free telecomm, or for use forany high speed PostScript Book-on-demand production. After my fullmonth of testing, I’ve now loudlyvoted "nay" and have gone back tousing my good old IIe.

Worse yet, any IIGS owner whowants to "upgrade" will be rudelysurprised when they find out thattheir color monitor can not be usedon the LC, and that they may haveto buy an additional and highlyoddball single sourced disk drive.

A summary of my Apple IIe carddiscoveries appears in figure one.

There are nine assignable "virtualcards" that are surprisingly welldone. These include a Super SerialCard for a printer, a second SuperSerial Card for a modem, and anAppletalk card. As is usual, onlytwo of these are permitted to beactive at any time.

The other virtual cards include avideo card permanently set in slotthree, a mouse card, a clock card, aserial RAM card, and the usual diskdrive cards in slots five and six.

Yes, ProDos Applewriter does run,even in its modem receive mode.And even with its internal printerbaud rate settings. Sort of. But notfor me. First, I had been going outthe game paddle port at 57600 baud for all my LaserWriter serial comm.This can be four times faster thanAppleTalk on any older Mac. Sadly,there are not any LC annunciatoroutputs. Which severely slowed myPostScript printing down.

All of my PostScript return errormessages and any return recordabledata get garbled by my LC. Even at19200 baud. The apparent cause is a

72.2

August, 1991

Fig. 2 – Mac LC to VGA color monitor cable adaptor.

2

1

9

13

5

6

15

14

12

11

10

7

3

4

8

RED

RED GROUND

BLUE

BLUE GROUND

GREEN

GREEN GROUND

HOR SYNC

HSYNC GROUND

VERT SYNC

VSYNC GROUND

VGA ENABLE

GROUND

1

6

3

8

2

7

13

10

14

4

5

9

11

12

15

RED

RED GROUND

BLUE

BLUE GROUND

GREEN

GREEN GROUND

HOR SYNC

HSYNC GROUND

VERT SYNC

VSYNC GROUND

VideoDB15 male

Video VGA male

MacLC

VGAMonitor

NC

NC

NC

NC

NC

NC

NC

NC

slow and ungainly scrolling routinethat drops groupings of charactersafter each carriage return.

There is another AppleWriterproblem that may impact other IIesoftware. Lots of the earlier Appleprograms output "high ASCII" codewith the eighth bit set. This givesHP LaserJets and QMS printers fits.

The quick and dirty high ASCIIcure was to use 7 data bits, SPACEparity, and 1 stop bit on the AppleIIe end, while running HP or QMSat 8,N,1. Sadly, space parity seemsto get ignored by the LC. To beatthis, I patched ProDos AppleWriter2.1 by changing out $4CAA: 09 80 to4CAA: 29 7F.

Other serious LC complaints arethat you cannot access the hard diskfrom the IIe side and do not haveany network access whatsoever tothe AppleShare server.

Those rearranged key locations,particularly control and escape, are sototally absurd as to be beneath anyrational comment.

The very popular ProTerm commprogram worked most of the time,but the final screen speeds end upunacceptably slower on the LC. TheLC makes ProTerm so infuriatingand klutzy as to be useless.

Apple is working on some ofthese card problems, especially thenetworkability, and an upgrade ortwo can be expected soon. Possiblyby the time you read this.

What Monitor Options areAvailable for the Mac LC?

The Mac LC is intended for usewith a horizontal scan rate near 35kilohertz, or over double that of theIIgs or standard television monitorscan rates of 15.735 kilohertz. Thus,an Apple IIgs monitor or most tvcolor monitor/receivers won’t workat all with a Mac LC. Don’t eventhink of trying it!

Yes, the DB15 connectors are thesame size on the older IIgs colormonitor and on the newer Mac LCmonitors. But neither the pinoutsnor the scan rates are the same.

On the other hand, genuine Applebrand color monitors can be veryexpensive and seldom discounted.

Fortunately, there is a provision inthe LC to drive most popular VGAcolor monitors now available atbargain prices. Figure two showsyou the simple adaptor cable re-quired to connect these two.

Note particularly that jumperbetween pins 7 and 10 at the Mac LCend. This is needed to activate aninternal VGA mode in the LC.

Usually it is best to make up ashort adaptor and attach it to aregular cable, rather than buildingup an entire special cable. Since thequality of any VGA monitor couldvary all over the lot, be certain tolook at real LC output before youmake any commitments.

Are There Other AlternativesIn Short Run Publishing?

As you regular readers know, Iam rather big on Book-on-Demandpublishing where individual titlesare produced on a when-orderedand as-ordered basis. The Book-on-demand works particularly well if

you do not know how many copiesyou are going to sell. Or if you aredealing with custom products orcontinuous upgrades. Some of mylatest Book-on-demand titles nownow do include the brand new Askthe Guru III, Hardware Hacker III,and Midnight Engineering reprints.

But it seems I just ran completelyout of stock on my Incredible SecretMoney Machine. That big mountainin the storehouse is now history.Besides, a revised second editionhas been long overdue. Since theISMM had already used up threeprintings and was an establishedclassic, there is no doubt that manymore could be sold. The ISMM is inits photographable hard copy formonly. No PostScript and some hard-to-recode illustrations.

What are the alternatives betweenyour own low end Book-on-demandself-publishing, and high volumetraditional printers? For use whenyou have a proven market, mightneed a quality product, and don’t

72.3

ASK THE GURU

Fig. 3 – A 222 byte fancy PostScript border.

% Copyright c 1991 by Don Lancaster and Synergetics, Box% 809, Thatcher AZ, 85552. All commercial rights reserved.% Personal use permitted so long as this header remains% present. LaserWriter Secrets book+disk $29.50 VISA/MC.

% Free voice helpline at (602) 428-4073.

% Stock tool excerpts from my GONZO13A.PTL…

/roundpath {/rpdata exch def /rprad exch def rpdata length 1 subcvi /rppoints exch def rpdata 0 get rpdata 1 get moveto 2 2rppoints 2 sub {/rpvalue exch def 0 1 3 {rpdata exch rpvalue addget } for rprad arcto pop pop pop pop} for rpdata rppoints 1 subget rpdata rppoints get lineto} def

/superstroke { save /sssnap exch def /sscmd exch def mark 0 2sscmd length 2 div cvi 1 sub 2 mul {/aposn exch def gsavesscmd aposn get setlinewidth sscmd aposn 1 add get setgraystroke grestore} for cleartomark sssnap restore newpath} def

% //// demo - remove or alter before reuse. ////

50 150 translate 10 dup scale

1 setlinejoin 1 setlinecap

1.99 [20 12 9 12 9 14 11 14 11 12 9 12 9 48 11 48 11 46 9 46 948 40 48 40 46 38 46 38 48 40 48 40 12 38 12 38 14 40 14 4012 20 12] roundpath closepath[0.8 0 0.5 1 0.28 0 0.1 1] superstroke

showpage quit

want to take time out to rekey andredesign the entire text?

I shopped around and foundthree interesting types of publisherswhich seem able to economicallyproduce small quantities (500-5000)of books.

The first of these is Thompson-Shore who is an old-line printer thatspecializes in short runs of customhardbound and quality paperbacks.These folks have a free Printers Inknewsletter available on any request.They usually do a top quality jobwith a fast turnaround.

Have you ever wondered justhow those paperback books on thenewstand already have reviewer’squotes on them? What happened isthat the publisher went ahead andslapdash threw together severalhundred el-cheapo copies and sentthem to the reviewers ahead of time.One firm that specializes in this sortof thing is Crane Typesetting. They

do have a free reprint for you titledBound Galleys: Where, How, When andWhy. Crane is fast and cheap, butthey are definitely not in the heir-loom business.

A final resource is Omnipress.These folks specialize in hundred-to thousand-copy lots of instructionmanuals, user guidebooks, andsuch. Often in wire bindings.

The pricing depends upon thesource, the quantity, the binding,and all your cover options. But, ingeneral, these three sources are farlower than working with a local jiffyprinter. Besides knowing how tobetter handle any specialized tasks.Please let me know if you have anyexperiences with similar short runpublishers. Good or bad.

By the way, if you would like topreview the new intro and revisionsto the new second edition of TheIncredible Secret Money Machine, I’veplaced #286 MONEYMACH.TXT up

on GEnie PSRT. Lots more on Book-on-demand publishing appears asfile #77 DEMAND.TXT

What is This Month’sPostScript Utility?

As I promised last month, we’llnow look at a quite compact and astunningly serendipitous brandnew border routine. Figure threeshows you all the details.

The trick is a technique I call arctocrowding. If you do not give yourPostScript arcto operator enoughroom to operate, it has to "insideitself out" and produces all sorts ofwild effects.

What we have done is create abox having tight squares on eachcorner. Squares so tight that arctohas to inside itself out to execute.To get fancy, you take a single pathand then repeatedly restroke it inthinner and thinner sequences ofwhite and black lines. Or even highquality grays.

For other neat borders, try radiusvalues of -6, -3, 0, 0.8, 5, and 7. Donot make the radius exactly equalthe corner size or you will get a div0blowup. Thus, if the corner boxesare 2.0 on a side, use 1.99 instead.

Your ready-to-run border codeappears as file #277 MITZIYUP.PSavailable on GEnie PSRT.

I’m always on the lookout forexamples of "raw" PostScript codewhich completely blow away thefancy illustration and applicationspackage. This border can be donewith about 222 bytes of code, notcounting the stock roundpath andsuperstroke routines already in myPostScript utilities GUTIL13A.PTL.

Let’s have us a new serendipitycontest. Just come up with any oldraw PostScript hack that can usestunningly few bytes to produce amind-blowing result. We’ll have allthe newly revised Incredible SecretMoney Machine book prizes, alongwith a big all-expense-paid (FOBThatcher, AZ) tinaja quest for twogoing to the very best of all.

Either mail your entries to me perthe blurb below, or else send themto me via [SYNERGETICS] throughthe GEnie email service. ❆

Don Lancaster’s

ASK THE GURUNovember, 1991

Special education softwareLeast square fuzzy data fitsVideo compression schemesPostScript-to-anything ideasEmbroidery on the Macintosh

73.1

Fig. 1 – Three popular video compression schemes.

(A) JPEG (Joint Photographic Experts Group) DCT Compression…

Takes 8 x 8 pixel arrays and performs a math transform on them,rearranging the picture energy and leaving a sparse data set. The data sethas some values removed and others quantized to lower accuracy. Thesparse array is then efficiently recoded. Often balanced and lossy.

While almost an industry standard, JPEG requires complex and unusualhardware and software. It also introduces objectionable tiling artifacts.

More info: Adobe Systems (415) 961-4400LSI Systems (408) 433-8000

(B) Wavelet Compression…

Takes video rows and performs a simple math transform on them, followedby video columns, rearranging the picture energy and leaving a sparsedata set. The data set has some values removed and others quantized tolower accuracy. The sparse array is then efficiently recoded. Usuallybalanced and lossy.

Uses standard or near standard digital signal processing hardware orsoftware. Far simpler and faster than DCT. No tiling artifacts.

More info: Aware Incorporated (617) 577-1700

(C) Fractal Compression…

Breaks down images into underlying fractal components that in turn can beextremely compactly encoded. Lossy and unbalanced. Hundreds of highquality images can be stored on a single floppy.

Allows simple software-only playback, even full animation. Encoding isslow and costly, requiring special hardware. Real time compression is notpossible at present. Ideal for CD ROM storage.

More info: Iterated Systems (404) 840-0310

Apple has a brand new 1991Mac Development ServicesDirectory available. It lists

hundreds of developers, contractprogrammers, and service bureaus.You can pick up a copy at your localuser group or dealer.

There’s a new Mac Research UsersGroup which otherwise calls itselfMacSciTech. You can modem themat (508) 755-5242 for more info, orelse contact them through Apple-Link under cons.lab.mfg.

Bunches of software for specialeducation are now available by wayof Braintrain at (800) 633-1221.

Apple is rumored to be droppingtheir APDA membership fee just ab-out the time you’re reading this.

What is New InVideo Compression?

Mostly a totally wild three-wayshootout, whose final results aregoing to be very interesting. You’llfind details in Figure 1.

How many bytes of computermemory does it take to brute-forcestore a movie? For a 90 minute filmto VCR quality, figure 262 x 350 x 60x 8 x 3 x 60 x 90 = 713 gigabits or a tadunder 100 gigabytes.

A result you get by multiplyingthe vertical resolution times yourhorizontal resolution, the number offields per second, the bits per color,the number of colors, the number ofseconds in a minute, and the totalnumber of minutes per film. Not thesort of job you’d care to hand key.

At least not before lunch.Now, say you decide to veg out

on a rental video of Godzilla Versusthe Night Nurses. Are you really go-ing to ask your brain to process afull hundred gigs? Well, perhapssome extra attention during the tap-ioca pudding scene. But the rest?

Obviously, there has to be a lot ofredundancy in those hundred giga-bytes. Redundancy gets introducedin individual fields through edges,

patterns, and large areas. Even moreredundancy appears in sequentialfields as only a small percentage ofpixels normally change from onefield to the next.

Video compression is any methodof squashing your total number ofbits on down into something moremanagable but still acceptable. Theexact choice of a decent video com-pression scheme is the centermostproblem today in multimedia, highquality computer graphics, and inHDTV standards.

A compression scheme is losslessif it lets you put everything backexactly the way it was. A lossless

compression is important for suchthings as bank balances and mosthard disk files. But compressingbeyond 3:1 and staying lossless getstricky with most data types. Evenfor typical images.

For video, considerably highercompression rates are possible byusing lossy compression. The loss ofdata does degrade the final picture.So the trick is to pick a good tradeoffbetween the compression ratio andthe quality you will accept. Today’slossy compression ratios are oftenaround 30:1 for "good" quality downto 100:1 for "useful" images.

A compression scheme is balanced

73.2

ASK THE GURU

Fig. 2 – Some least squares fuzzy curve fits.

LINEAR(first order)

QUADRATIC(second order)

CUBIC(third order)

if it takes about the same time andcircuitry for the compression as thedecompression. It is unbalanced ifthe decompression is much fasterand simpler than the compression.Unbalanced compression has theadvantage of needing little or nospecialized hardware at the displayend. At the penalty of requiringlengthy and expensive compressionalgorithms.

The first compression scheme offigure 1, and the one with the mostmomentum is known as JPEG (JointPhotographic Experts Group) com-pression. This uses the math trickcalled a Discrete Cosine Transform.

The picture is broken down into 8x 8 arrays of 64 pixels each. The DCTis then run on each 64 pixel group,by exotic math and trig. The resultfor each 64 pixel block is a number.A number that takes into accountinherent picture redundancies suchas edges, patterns, and areas.

The neat part about the DCT isthat it will redistribute the pictureenergy. Most of the final numbersare either zero or near zero, creatinga sparse data set.

By recoding, you can do a lossless3:1 or higher DCT compression. But,better yet, by ignoring some values,and quantizing all the others to lessaccuracy, you can go lossy and ar-bitrarily increase your compressionratio. All the while trading off thepicture quality and accuracy. TheDCT is balanced, requiring aboutthe same time and effort to com-press as decompress.

All sorts of DCT hardware chips

have recently been announced, withLSI Systems being one leader in theDCT field. (408) 433-8000.

A complete 100 page JPEG spec isavailable from Adobe Systems (415)961-4400. This reprint is free to allAdobe developers; $15 to others.

The main advantages of the JPEGmethod are that it is soon to becomean international standard and thatlots of time and effort have beenput into it. It is here now.

The disadvantages are that themethod is unnecessarily cumber-some for what it delivers, and thatobjectionable picture tiling artifactsget introduced. Unfortunately, JPEGlooks like a standard which mightend up obsolete before the ink onthe final version is even dry.

Wavelets are a brand new way ofdoing mathematical transforms thatis revolutionizing everything fromoil exploration to cardiology on toanimal vision. Wavelets are about tocompletely blow traditional Fourieranalysis out of the saddle.

In fact, if you are now doinganything at all advanced in eitherelectronics or computing, and arenot now getting into wavelets in abig sort of way, then you have justvolunteered for early retirement.

A useful (but difficult) book onwavelets is available from Jones andBartlett (617) 482-3900. I also havesome coverage in my new HardwareHacker III reprints.

There are several good waveletcompression schemes. These takepicture rows and transform them,followed by the picture columns.

Unlike the DCT, the wavelet trans-formations are nothing but a bunchof simple shifts and adds. Shifts andadds which are easily and quicklydone in standard or near-standarddigital signal processing software orhardware.

There are no tiling artifacts, andthe system can be balanced. It alsoappears that wavelet techniques areused in the internal processing ofhuman and animal vision.

Similar to the DCT, the wavelettransformation can redistribute thepicture energy into a sparse arrayfor lossless compression. The sparsearray can then be lossy compressedby ignoring some values and quan-tizing others to less accuracy.

The picture degradation causedby a higher compression value isnormally in the form of broadbandnoise. Which most viewers find farless objectionable than the jaggies,Hershey-barring, or tiling.

Surprisingly large amounts of thebroadband noise can often be addedwithout too many complaints.

The leading proponents for thewavelet compression are Aware at(617) 577-1700. You can now contactthem directly for hardware, for theemulation software, and for the freewavelet technical papers and apnotes. They also do have a greatsimulator and tutor known as theUltraWave Explorer.

The advantages of the waveletcompression are that it ends up farcleaner, far faster, and far simplerthan JPEG, while at the same timecreating better and more consistentfinal results. But an awful lot moretime and effort has been dumpedinto JPEG and those folks will noteither gracefully or willingly admitthat they have been had.

Finally, we have a real maverickknown as Fractal Compression. Wehave seen in previous columns andin the Ask the Guru reprints how todo a full page fractal fern using amere 28 data values in a compactarray. Which approaches a losslesscompression ratio of 50,000:1. Youcan also find this fern as GEnie PSRT#84 FRACTFERN.PS.

With fractal compression, you

73.3

November, 1991

Fig. 3 – The math behind least squares fuzzy curve fitting.

(A) The LINEAR or FIRST ORDER least squares fit uses an equation of…

y = a1x + a0

Here are the two linear equations in two unknowns that you need to solve to get the best fit for your data…

(sumx1)a1 + (#pts)a0 = (sumy)

(sumx2)a1 + (sumx1)a0 = (sumx1y)

(B) The QUADRATIC or SECOND ORDER fit uses an equation of…

y = a2x2 + a1x + a0

Here are the three linear equations in three unknowns that you need to solve to get the best fit for your data…

(sumx2)a2 + (sumx1)a1 + (#pts)a0 = (sumy)

(sumx3)a2 + (sumx2)a1 + (sumx1)a0 = (sumx1y)

(sumx4)a2 + (sumx3)a1 + (sumx2)a0 = (sumx2y)

(C) The CUBIC or THIRD ORDER least squares fit uses an equation of…

y = a3x3 + a2x2 + a1x + a0

Here are the four linear equations in four unknowns that you need to solve to get the best fit for your data…

(sumx3)a3 + (sumx2)a2 + (sumx1)a1 + (#pts)a0 = (sumy)

(sumx4)a3 + (sumx3)a2 + (sumx2)a1 + (sumx1)a0 = (sumx1y)

(sumx5)a3 + (sumx4)a2 + (sumx3)a1 + (sumx2)a0 = (sumx2y)

(sumx6)a3 + (sumx5)a2 + (sumx4)a1 + (sumx3)a0 = (sumx3y)

(D) For QUARTIC or HIGHER ORDER least square polynominal fits, justextend the math in the obvious direction for n linear equations in nunknowns. Solve for the coefficients. Extra precision may be required.

(E) For least square fits to OTHER EQUATIONS, write out the least squareserror equation. Then take partial derivatives with respect to eachcoefficient and set them to zero. This again leads to n linear equations inn unknowns. Solve for the coefficients.

break your image down into fractalelements and then transmit only thecodes for those elements. The sys-tem is unbalanced, requiring longtimes and lots of costly hardwareand software on the compressionend. But playback can be done withlittle or no special hardware at all.Thus, you can replay your fractalcompressed VGA or similar videonow on your existing computer.

Even stunning full animation.The folks at Iterated Systems (404)

840-0310 are the leaders in fractalcompression. A few of their newlyintroduced products do include theFractal Factory Video Player, and theFractal Factory Slide Projector, plustheir P.OEM development systemsand hardware. The slide projectorscan store a hundred images on anordinary floppy. And it can run atreal animation speeds.

They also have lots of books, apnotes, and literature available.

The big advantages for fractalcompression include the very highcompression ratios and the ability touse nothing but software for fullanimation playback on an ordinarypersonal computer. Two major dis-advantages are that a compressioncan not be done even remotely nearreal time and that horrendously ex-pensive software and hardware isrequired on the compression end.

Most of the images I’ve seen sofar are quite spectacular. They areparticularly impressive when runon larger and faster machines.

Just who is going to be the bigwinner in video compression? Staytuned as events unfold.

What’s New in Embroidery?This one should really have you

in stitches.I haven’t fully tested it yet, and it

is single-source expensive but notoutlandishly so. The support soft-ware is also primitive and klutzyyet definitely useful. This is thePOEM 500 Mac embroidery system,manufactured by Aisin and stockedin depth by Leonard’s Distributors(916) 967-6401.

What you’ve got here is a classicmechanical embroidery machine

having a serial Mac interface andsupporting software that lists foraround $1200.

Your active area is about fourinches on a side, making it ideal forsuch things as shoulder patches,gimmie caps, or nearly any otherpersonalized textile item.

The number of different colorsavailable are unlimited. You do, ofcourse, have to change your threadcassettes for each color. And fancyjobs will take longer than simple

ones. As with most sewing, yourprocess is labor intensive and willdemand someone into fabrics in oneway or another.

Your max sewing speed is 300stitches per minute. The softwareuses Hypercard and all of the usual tools. Resolution is the 72 DPI of theMac screen. Serial comm is used.

Besides being one source for anunlimited supply of monogrammedgifts, any computer controlled em-broidery machine offers all sorts of

73.4

ASK THE GURU

opportunities at flea markets, fairs,or for specialty advertising. Thereshould also be major possibilites infund raising, in kiddie crafts, andspecial education as well.

More on this beast after we have achance to check it. Their thick feltsamples are really impressive. Beeand Kathy are a lot more into stringbending than I am, so we’ll see whatthey come up with.

My big gripe on this should beobvious: Any genuine Adobe Post-Script software interface and driverwould make the system infinitelymore useful, more powerful, andmore convenient. Especially for thecircular shoulder patch text.

The first person to come up witha universal PostScript-to-anythinginterface will run away with a verylarge bag of nickels. Besides looms,embroidery, and sewing machines,other obvious goodies to bolt ontoa PostScript-to-anything interfaceinclude signmakers, Santa Clausdesktop prototyping systems, forengravers, animation stands, vinylcutters, new virtual reality, printedcircuit drilling, fully programmablerouters, and CAD/CAM.

How Can IConnect The Dots?

Actually, it is a lot harder than itseems. So, I thought I’d throw someheavy stuff at you for this month’sPostScript utility. Which is a quickand convenient way to draw engin-eering curves starting with a fewnoisy data points.

One of the big things everyonewants to do by using PostScript isliterally connecting dots. To take aseries of sparse, noisy, and lowresolution data points, and thenconvert them to smooth and highresolution PostScript curves.

Compactly and quickly.The obvious way to do this is

with cubic splines and groups ofPostScript curveto or rcurveto oper-ators. I’ve already shown you aneveryday workaround using myGonzo Guru Curvetracing Utilities.

Our older classic puddy tat #79MEOWWRRR.PS on GEnie PSRT isone example, while the full details

appear in my PostScript BeginnerStuff package.

The secret to the curvetracing isto hand spec each joint with a triadof xposition, yposition, and slopeanglevalues. Then you use some fairlyweak splines to create the smoothcomposite curve.

But curvetracing can be tediusand does not work very well withfuzzy or noisy data. Working withinaccurate data can get tricky fast.Especially when you try to decidejust how many splines to use andexactly how to line them up. Orwhen to substitute straight lines orsharp corners. Any truly generalsolutions may turn out unbearablyslow since they might take severalhundred approximation passes todo the work.

The big, fat, ugly, slow, heavy,arcane, obtuse, and hairy mathinvolved in doing the job right isshown to you in Curve-Fitting withPiecewise Parametric Cubics, found inthe 1983 Siggraph/ACM #3 issue ofComputer Graphics, pages 229 to 239(212) 869-7440.

I have been chewing away at thisbeast for several months now, andhope to eventually have some realgoodies for you. As a stop along theway, I decided to explore fittingfuzzy data in general, doing what isknown as a least squares curve fit.And I found out that many engin-eering plots and responses (pumpefficiencies, transistor responses,temperature nonlinearities, etc.)can be drawn quickly and simplyjust by dropping in a few sloppypoints and then doing a plain oldleast squares fit to a single andsimple power series.

Figure two shows you the threemost popular least squares powerseries fits to fuzzy data. These arethe linear fit (put a straight linethrough it), the quadratic (pick aparabola), or the cubic (a third orderpower curve). I found that fourthand fifth order curves can be used toquickly draw just about any curvefound in an engineering data book,starting with very few and possiblynoisy points. Only one set of datapoints and a single piece curve is

normally needed.Fitting one single curve to real

world data works best when thecurve does not cross itself and whenthere are no violent changes in thecurve’s direction.

Even the least squares math ishairy, but it sure beats using thosesuccessive approximations to fifthorder Newton-Raphson iterationsthat the full spline solution seems toneed. Figure three shows you thekey math involved in doing leastsquares error fitting. Enjoy.

All we mean by least squares isthat we try to divide the errors up sothat all the points share equally inthe compromise. The square is usedso that all the negative values endup below the curve and positiveones above. To do a least squares fit,you write out an expression for thesum of the errors squared for yourdata points along the precise curveyou are trying to fit.

Then you find the slope or partialfirst derivative of all the errors withrespect to each variable involved.Set the slope or derivative to zero tofind the minimum. This results in anew system of linear equations of nvariables in n unknowns which yousolve once. Solving for n gives youthe everyday working formulas.

Naturally, I do feel PostScript isabsolutely ideal for this sort of thingsince it is a totally general purposecomputer language that is supereasy to use. The final results aresomewhat on the longish side, so Ihave posted them to GEnie PSRT.Start with #289 LINEAREQ.PS and#290 FUZZYFIT.PS and then pick upthe ongoing newer stuff that showsyou some of the secret special tricksinvolved in improving accuracy onthe fourth and fifth order curves.Included is code for solving linearequations, routines to fit fuzzy data,and handy utilities to draw yourcurves, the background graph, andall of the individual data points.Additional tutorial info appears in#302 HACK43.TXT.

You can get your voice connectinfo for GEnie at (800) 638-9636. Theaverage cost of a PSRTdownload isaround twenty-one cents. ❆

Don Lancaster’s

ASK THE GURUDecember, 1991

Laser printer hard disksMac LC IIe card upgrade

Flocks and flocking ideasAvoiding baud rate limiting

Studying Click-to-Clunk times

74.1

Fig. 1 – Guidelines for laser printer hard disk use.

1. Hard disks very dramatically improve the speed and convenience ofPostScript printing. If you can use a local hard disk, be sure to do so.

2. Always turn your hard disk on several seconds before you apply printerpower. Always turn your printer off first.

3. Always use an absolute minimum of three megabytes of printer memory ifyour printer is connected to a hard disk.

4. Always keep a complete, full, and separate backup of all your hard diskfiles readily available.

5 Never defeat your startup page. It tells you if your disk is working andwarns you of impending doom.

6. Always completely re-initialize and rebuild your hard disk once a month.Or any time your test page starts taking much longer to print out.

7. On the LaserWriter NTX, be certain to use Revision 3.0 or higherfirmware. Note that the disk filenames change when you do this upgrade,from %disk%myfile to %disk5%myfile, where the five (or whatever) isyour preset device number.

8. There is only one difference between storing a font and storing any oldfile used for any old purpose. The font goes in a special subdirectorycalled %disk5%fonts/Myfontname.

9. Some SCSI hard disks use a 25 pin connector physically identical to aserial RS232 connector. Immediate and permanent damage is almostcertain to result if you plug a SCSI device into RS232 or vice versa.

10. Some SCSI hard disks will lock themselves out for a half hour or so afterpower is even briefly removed. Thus, you should never briefly powerdown a hard disk.

11. Never send a new file to your printer if the disk is actively modifying itsfont cache. Always wait till the activity light goes off.

12. Avoid pixel line remapping and other "lots of fonts in a hurry" techniqueswhile your hard disk is active. Creative use of the setcacheparamsoperator can help bunches here.

13. If at all possible, set up a shared SCSI comm environment where you candirectly transfer files from your host to your hard disk. While highlycustom, this technique is ridiculously faster than serial or AppleTalk.

14. Additional hard disk info appears in the Apple White book, in my Ask theGuru reprints, and on GEnie PSRT files 99, 100, 107, 108 and later.

Apple has released the newsoftware 2.0 upgrade fortheir Apple IIe emulation

card used on the Mac LC. This givesyou IIe hard disk access and lets youuse AppleShare. Printer access isalso improved. It still does not allowuse of 800K platinum drives on theApple side. Part number for the $29 upgrade kit is M1222LL/A.

Only some software changes areinvolved; the firmware ROM chipsremain the way they were.

You will have to trash out andreinitialize the hard disk wheneveryou do the upgrade, since the diskwill get partitioned into a ProDosportion and a Mac portion. Yes, youcan read and access your Apple filesfrom the Mac side. But only whenusing AFT or other programs whichknow how to read ProDos.

Several Apple IIe & IIGS relatedproducts have also now been newlyintroduced. While well done andsorely needed, they seem way toolittle and far too late. These includea new GS/OS 6.0 operating system,support for the denser disk driveformats (including MS/DOS), andan Ethernet card. Since the latestLaserWriter offers really high speedEthernet comm, I am especially in-terested in this gem.

Word has it that the new HewlettPackard IIIsi laser printer will slowdown ludicrously under Windows.Which has thoroughly hacked offdozens of my helpline callers. HPoften responds to its obvious andmajor technical printer flaws usingthe "circle the wagons" and "shootthe messenger" approach. It will beinteresting to see what gets donewhen on this one.

Adobe Systems (415) 961-4400 has anew freebie bulletin for you on TypeI Multiple Master Typefaces. Read allabout the next font technology im-provement beyond Level II.

I’ve just got a sample of the newXante Accel-a-Writer II tray for the

NTX and hope to review it for youshortly. (800) 992-6839. At my firstglance, the obvious advantages areRISC high speed true 600 x 600 DPIresolution out of your LaserWriter.With auto Mac/IBM interfacing andoptional dual-page makeup. Andthe negative stuff seems to includefake PostScript and a non-standard

disk operating system.In addition to the Mac embrodery

system we did look at last month,Meistegram (800) 321-0486 does offerseveral computer controlled mono-gramming options. Since old-linefranchises are involved, check outyour alternates thoroughly.

I’ve gathered all of my previous

74.2

ASK THE GURU

Fig. 2 – PostScript’s secret Click-to-Clunk speed curve.

RUNTIME FILE LENGTH

CL

ICK

-TO

-CL

UN

K

TIM

E

REGION "B"has balancedcomm and PS

makeready

REGION "A"is severelybaud rate

limited

REGION "C"is PostScript

interpreterlimited

MOST USERSwill start out sixblocks thataway

Book-on-demand publishing stuffin to a new Book-on-demand resourcekit. Write or call me per the endblurb for more info.

As usual, most of the productsmentioned appear in the Names andNumbers appendix. Further help isavailable via a no-charge voice help-line at (602) 428-4073 and by way ofGEnie PSRT at (800) 638-9636.

Onward and upward…

Please Update me on LaserPrinter Hard Disk SystemsHigh end PostScript laser printers

demand a dedicated SCSI hard diskfor exclusive printer use. In fact, it isextremely foolish to buy a Laser-Writer NTX or a QMS turbo PS820printer without picking up (and ag-gressively using) the hard disk atthe same time. Note that this is atotally different hard disk than getsused by your host computer.

There are many major advantages

to hard disk laser printing. Most ofthese involve speed and conven-ience. Your font cacheing becomesvirtually permanent, instead of itsgoing away each time you powerdown. You can now locally storehundreds or even thousands of nowquickly available fonts. You canprestore any and all of your favoritepersistent downloads. Other times,your hard disk can eliminate theneed for most persistent downloadsand the VM resources they waste in your printer.

You can store individual files upto entire books on your hard drive,and access them in seconds, ratherthan those long serial or AppleTalkcomm times normally involved. Byusing a hard disk, your overnightBook-on-demand publishing can beautomated and done unattended byan operator or host computer.

Many new Postscript-as-languageroutines require the ability to write

their non-printed output files to ahard disk. Foremost among these isthe Adobe Distillery, but there arehundreds more.

And, finally, if you are sneakyenough, you could set up a SharedSCSI comm which lets you directlycommunicate between the host andprinter at SCSI speeds, rather thanthe excruciatingly slow AppleTalkor serial rates.

For most users, any old 20 megSCSI disk is more than adequate.You usually do have to be sure it isan Apple-compatible drive that iscapable of returning its size to thehost. Watch this detail.

Figure one sums up some of thehard-to-find guidelines for laserprinter hard disk use.

Early versions of the LaserWriterNTX had severe hard disk blowupproblems. The worst of these can begreatly eased by going to the newROM 3.0 upgrade, using at least 3megs of RAM, and always turningyour hard drive on several secondsbefore your printer.

Never send any new file to yourprinter while its activity light is onor it is reworking its internal fontcache. Be careful!

As with any hard disk anywhere,you should keep a separate and acomplete backup of all of your filessomewhere else.

Laser printer hard disks are stillso flakey that they will eventuallyblow up. Thus, you should alwaysre-initialize and rebuild your diskonce each month. One clue that doesnot bode well is when your startuppage starts taking longer.

By the way, it is never a good ideato defeat the test page if you have ahard disk in your system. Firstoffbecause it tells you whether yourdisk is currently active. And second,because progressively longer testpage times tell you that disaster isabout to strike.

Much more on hard disk systems appears in the Apple White book,otherwise known as the LaserWriterReference. By one of those aston-ishing coincidences that seem toinfest this column, I do have copiesof these in stock for you here at

74.3

December, 1991

Fig. 3 – Reducing your Click-to-Clunk times.

(A) If you are BAUD RATE LIMITED…

1. Shorten your files! Eliminate comments. Use persistent downloads.

2. Give PostScript more to do in such a way that it needs fewer filecharacters. Examples: /m for /moveto; Reducing to minimum neededaccuracy; not repeating or transmitting redundant data; defeatingscreen echo; or using more efficient codings.

3. Avoid the image operator, especially when raw PostScript gives betterresults faster. Recode essential image files in binary or in ASCII-85formats, rather than as hex-ASCII pairs.

4. Eliminate your baud rate limit completely by using files on a hard disk.Or switch to Ethernet or shared SCSI comm.

(B) If you have BALANCED COMM…

1. Measure your actual and exact de-facto baud rates. These will almostalways be much worse than you think.

2. Measure the execution times of individual portions of your PostScriptcode to find out what takes the longest. Typically, 20% of your codetakes 80% of your time.

3. Improve your hardware, software, firmware, and programming style.

(C) If you are POSTSCRIPT INTERPRETER LIMITED…

1. Give PostScript less to do by using more but simpler commands inpossibly longer files.

2. Compile your files using the ADOBE DISTILLERY and then, ifneeded, by doing a second double distilling.

3. Minimize use of known time-wasters such as irregular clippingintervals, or crude translations from the pre-PostScript world.

4. Use table lookup or predefined array methods to replace extensivecalculations or complex logic.

Synergetics.Other good sources for hard disk

info does include the Ask the Gurureprints, and GEnie PSRT, especiallyfiles #99, 100, 107, and 108.

How Can ITend My Flock?

I do see you are thinking fuzzyagain. Although flocks and flockinghave traditionally been the mostarcane of artsy-craftsy backwaters,they are about to hit our desktoppublishing big time and offer someexciting new opportunities. So, Iguess it’s time for a rundown…

One old-line source of traditional"cabbage duster" flock is Don Jer.(800) 336-6537. They sell mostly tothe industrial education market forthe stamp box and award plaquecrowd. You paint on colored glueglop and then dust the flock intoplace. Then you shake off the excessand let it dry. Instant fuzz.

A leader in flocks intended forheat transfer to fabrics and T-Shirtsis HIX Corporation (800) 835-0606.

One of their more interesting pro-ducts is their paper release sheetcompletely covered with a fuzzyflock. In your choice of two dozencolors. You then paint or silk screensome thin cold glue onto the flockand then sprinkle some heavier hotglue crystals into the wet areas.

Which in turn creates an iron-ontransfer that lets you apply fuzzyletters, numbers, or artwork on anytextile, T-shirt, or gimmie cap.

The cost is seventy cents a sheet.Sadly, toner doesn’t seem to want

to grab flock the same way it doesKroy Color and other hot stamp ma-terials. At least my first try failed.

Although it should be possible toPostScript laser print an image anddo "something" to it that makes theflock permanently stick to it. Fuzzyand "cuddly" letterheads should bean unusual and possibly a winningnew product.

The big boys do not use flock. In-stead, they use a hot split plastisol.Which is a thick colored plastic thatgets heat transfered to your fabric.Before your transfer can cool, thebacking is violently stripped away,

literally tearing the plastisol in halfalong its thickness, and leaving a per-manent felt-like fuzzy surface onthe fabric.

One major player in the hot splitplastisol supplies is Gerber Scientific.(203) 644-1551. A freebie booklet onThe Art of Applying Transfers is nowavailable from Stahls (800) 521-9702.Two trade journals on this sort ofstuff include Screen Printing (513)421-2050 and Signcraft (813) 939-4644.

Let’s make a contest out of this.Either send me some direct Post-Script laser printed cuddly fuzzystuff samples, or else add to ourflock dialog in some way.

There will be all of those newlyreissued Incredible Secret Money Ma-chine book prizes for those bestdozen or so entries, along with an

all expense paid (FOB Thatcher, AZ)tinaja quest for two going to the bestof all. As usual, send your writtenentries directly to me at Synergeticsper the end blurb.

What is Meant by PostScript’s"Click to Clunk" time?

How would you like to decreasethe makeready time of your Post-Script printer by a factor of ten ormore? Actually, this is usually realeasy. All you have to do is eliminateall of the common and really dumbmistakes others are usually makingwhen they blindly try and apply thePostScript computer language.

As an example, I routinely do athree column 6000 character fullyjustified page makeup with headers,footers, and a pair of figures in two

74.4

ASK THE GURU

to four seconds of makeready time.From an Apple IIe, no less.

The insider secrets we are aboutto look at perform best when yourPostScript output is to be used morethan once in the future. Obviousplaces include Book-on-demandpublishing and uploads to bulletinboards that many others will reuse.Or, when doing some rather-slowphototypesetting. Often, severalsimple and quick tricks done oncecan dramatically shorten all of yourfuture print times.

Your Click-to-Clunk time is justthat: The measure of how long ittakes from the click of a mouse orreturn key until the printed pageclunks into your exit tray. Yourpersonal Click-to-Clunk time is theonly real measure of printer speed.

There is a little-known optimumfile length for any printed Post-Script page. Get under this magicfile length, and your PostScriptinterpreter time takes too long. Getabove the magic length, and youbaud rate limit. Most beginningPostScript users most of the timeend up horribly baud rate limited.Especially with AppleTalk.

As figure two does show us, theClick-to-Clunk curve for a typicalprinter is not at all obvious. Thereare three definite regions to yourClick-to-Clunk curve. By knowingwhich region you are in, you cantake easy steps to improve yourmakeready time. On the other hand,if your steps are inappropriate forwhere you are on the curve, you cando far more harm than good.

Figure three summarizes somegood strategies for each region.

In region "A", you are baud ratelimited. There are so many char-acters in the file that the PostScriptinterpreter has to continually waitfor new ones before it can continue.If you end up baud rate limited, thespeed and performance of yourprinter does not matter in the least.Bytes cannot be used before theyarrive. And most users most of thetime are severely baud rate limited.

Baud rate limiting can set in withfiles as short as 8K. With typicalcomm setups, if control does not

return to your host until printingstarts, than you’re likely to be baudrate limited.

If you are baud rate limited, theobvious thing to do is to shortenyour file. Remove unneeded char-acters and excess documentation.Rearrange your file so that yourPostScript interpreter has stuff to doright away, rather than having towait forever before it starts. Useearlier and shared persistent down-loads whenever possible.

Since your printer is obviouslymuch faster than you need, thinkabout having it do extra jobs thatcan shorten your files. For instance,instead of using dozens of movetocommands, use a m instead, thusshortening your file by hundreds orthousands of characters.

Instead of repeating a zillion "0,32, 0" constants before each awidth-show, use some creative stack rollingand insertion to eliminate hundredsor thousands of characters.

What kind of accuracy do youneed? For routine positioning under600 DPI four decimal places will dojust fine. Instead of a 456.789, use456.7 instead. Better yet, use 4567and work at one-tenth size. Whichthrows a zillion no longer neededdecimal points out of your file. Forsetgray values, two place accuracyshould be more than enough.

Decimal numbers are one reallylousy way of storing any value. Forinstance, 4567 gobbles up five bytes(including the space) to representitself. By other codings, those fivebytes should be able to represent upto 256^5 or over ONE TRILLION dif-ferent values!

What about images? These arereal byte wasters. Very often, youcan substitute raw PostScript codefor your image, and pick up a 1000:1or higher reduction in your bytecount. While actually improvingyour appearance and print speed atthe same time.

The image operatator often getsused as a sloppy crutch by lazywriters of pre-PostScript applicationpackages who just don’t know anybetter. The time to feel sorry forthem has long since passed. Pac-

kages such as the Adobe Illustrator orAldus Freehand can greatly help you in tracing over all your images withreal PostScript.

My own personal preference, ofcourse, is to just use raw PostScriptinstead.

If you absolutely must use animage, make the active area as smallas is reasonably possible. Lots ofsequential 00 values in your imagecode is a good sign that you can cutyour size and lose nothing. Thensubstitute a better coding, such asbinary or the new ASCII85 in the redbook. Binary cuts your code by half;the easier to use and much moretransportable ASCII85 by aroundforty percent.

A trick to region "A" speedup isto give your PostScript computer alittle more work to do, while at thesame time significantly shorteningyour file sizes.

Over in region "C", the PostScriptinterpreter is taking far too long tomake up the pages. Use the AdobeDistillery and a possible double dis-tilling pass to dramatically speed upyour runtimes here. We have lookedat this compiling in detail a fewcolumns back. A shareware copy of#186 DISTILL.PS is now available onGEnie PSRT.

In region "B", your comm and in-terpreter times are at a balancedminimum. Characters arrive just intime, immediately before they arereally needed. To improve on thisapparent minimum, measure yourde-facto baud rates. Chances arethey are ridiculously slower thanyou expect. Then find out whichportions of your program are takingup the most time. Finally, improveyour hardware, software, firmware,algorithms and programming style.

Obviously, that big dip in region"B" is a rapidly moving target. But ifyou land "in the trough" for a NTXat an honest 19200 baud, you’ll havea good solution for most other usersand many other printers. With morepractice, you’ll do even better.

As a second contest this month,just tell me all about any sneaky,seldom-used, or off-the-wall Post-Script speedup technique. ❆

Index

Keyword Index

xvi

Action table – 62.4, 62.5Addison-Wesley – 63.2, 68.1adjudication – 64.2Adobe Distillery – 61.1, 62.4, 71.3, 74.4Adobe Font Downloader – 61.3Adobe Systems – 61.5, 70.1, 73.2Adobe Type Manager – 60.1AFT Type Designer – 70.1Aisin – 73.3Aladdin – 67.2America On-Line – 59.1ammonium persulfate – 59.3annealing – 59.3APDA – 61.1, 64.1Apple Assembly Cookbook – 61.4Apple Assembly Line – 63.2Apple CD-Rom – 61.1Apple Fiesta – 61.1Apple File Transfer – 65.3Apple Library Users Group – 59.1Apple II Guide – 68.1Apple II SCSI card – 64.1Apple IIe – 61.3, 62.3Apple IIe plug-in card – 67.1, 72.1Apple IIgs – 59.1, 63.2Apple IIgs RGB color monitor – 71.1AppleLink – 59.1AppleTalk – 61.3, 64.2, 74.4AppleWriter – 60.1Appliance – 59.6arcto crowding – 72.3Ares FontManager – 70.1artist opportunities – 61.1ASCII textfiles – 61.3ASCII85 – 70.3Ask the Guru – 66.5, 68.1Associated Bag Company – 68.5A2 Central – 60.1, 63.2, 69.1author’s royalties – 69.3auxiliary handshake – 60.5avuncular sleezoids – 60.5award plaque – 74.3awards and certificates – 70.5

Backlist titles – 69.3backwards lettering – 60.6Badge-A-Minit – 61.2Baker, Woody – 69.6Bakerizing – 69.5, 70.2Bakerizing Film – 70.4balanced compression – 73.1

banner font – 68.5bargraph – 66.4baud rate – 61.4baud rate limited – 62.2, 70.2, 74.4BBS download – 59.2BBS services – 67.2beige book – 68.1Bestine – 69.2Bezier curve – 60.3, 60.5Bezier surface text – 68.4binary encoding – 70.1, 70.2bind def – 68.3binding registration – 64.6binding systems – 62.1bitmap – 60.7bitmap obstinticity – 60.3black book – 61.5, 62.1, 62.5, 64.1Black Lightning – 59.3, 64.6black magic – 60.7blackflasher – 61.5Blatant Opportunist – 59.2, 64.2block read – 64.3block write – 64.3blown password – 69.6BlueValues – 62.1Book-on-demand – 60.7, 61.1, 62.2, 68.4, 69.3, 70.5, 72.2border – 71.4Bound Galleys – 72.3BoundingBox – 59.4Braintrain – 73.1business cards – 68.5, 70.4button printing – 70.1

Cable adaptor – 72.2calandering – 70.4Call A.P.P.L.E. – 60.1callsubr – 62.5camera ready art – 70.2Canon – 67.1Caplug – 69.3cartridge refilling – 65.2Catalina Plastics – 69.6CD-ROM – 63.1, 64.1, 67.4, 69.4Chaos - Making a New Science – 64.7chaos science – 64.6chaos science resources – 64.4Charstring – 62.1, 62.4choke – 68.6Circuits Manufacturing – 59.3cliche – 59.5

Click-to-Clunk speed curve – 74.2Click-to-Clunk time – 74.4closepath – 68.5CMOS Cookbook – 61.4cold glue – 69.4color monitor – 72.1, 72.2color separation – 70.2comm speeds – 64.3commons files – 64.4commons ploy – 64.2, 64.3compaction – 67.2compiled code – 68.2compiled PostScript – 68.2Computer Graphics Review – 60.5Computer Reseller – 66.2Computer Resources – 68.1Computer Shopper – 60.2conforming document – 59.4connection dots – 73.4converter – 69.5Converting – 69.6Copymate – 69.2copypage – 65.1, 65.3, 66.1Crane Typesetting – 72.3CrossTalk – 61.3, 62.3cubic – 73.4cubic spline – 68.5, 73.4currentmatrix – 63.6curve fit – 73.4curvetracing – 68.6Customer Assistance – 67.1customer service line – 69.1CX manual – 60.2

DCT – 73.2decimal numbers – 74.4dehumidifier – 66.3demo disk – 62.4Design News – 59.6desktop finishing – 69.4desktop prototyping – 73.4desktop publishing – 70.2Develop – 61.1Developer Handbook – 63.1device independence – 63.4Diablo emulation – 66.3Dialog Information Service – 67.3dialplate – 63.2dictfull errors – 70.2dictionary – 71.4Die-O-Perf – 70.5

xvii

Ask The Guru III

diffusion transfer printing – 59.6direct SCSI – 60.3direct toner printed circuits – 59.1dirty primary corona wire – 67.5Discrete Cosine Transform – 73.2Disk Named Wanda – 63.1distilled PostScript – 68.3Distillery – 62.4, 63.3, 68.3Distillery bugs – 68.3Distillery example – 68.2DLM Teaching Resources – 68.1Document Structuring – 63.3dodging and burning – 66.4DonJer – 74.3dotsection – 62.5double distilling – 68.4double sided printing – 71.2dummy files – 64.3duplex copypage problem – 69.1duplex print quality tester – 67.2duplex printers – 67.4, 69.1duplex printing – 64.5duplex quality bugs – 67.4duplexing – 71.2Dynamo – 61.1

Eexec – 61.2, 61.3, 61.4effective baud rate – 62.3, 67.3EHANDLER.PS – 60.4Electronic Packaging – 59.3electrostatics – 67.5embroidery – 73.3emerald controller – 64.1Encapsulated PostScript – 59.3, 63.2EPS file – 59.3, 63.2, 63.3, 70.2error mesages – 61.4error trapper – 65.2escape character – 61.4Excel – 71.1

Fake milk crate – 66.3fancy PostScript border – 72.3fax capability – 71.2fax filter – 70.2filter – 66.4, 70.1filtered histogram – 66.4final prepress art – 70.3first derivative – 73.4fixed position files – 64.4flexproc – 62.1flippity-flopper – 61.1flock – 74.3flyleaf – 62.1Foiled Again – 65.5font cache – 60.6, 64.3, 71.4font matrix – 68.2font path – 60.3, 70.1font path grabber – 67.5

formatting text – 70.5forms – 70.1forms capability – 70.34-ppm laser printers – 61.1Fourier analysis – 73.2fractal compression – 73.1, 73.2fractal fern – 60.1fractal geometry – 64.7Fractal Geometry of Nature – 64.7fractal resources – 64.4framedevice – 71.4Freedom of the Press – 60.1, 63.3FreeTerm – 61.3fusion assemblies – 67.5fusion wiper pad – 59.3fuzzy curve fits – 73.2, 73.3fuzzy logic – 65.1

Gane Brothers – 62.2garbage collection – 71.4Gaussian weighted average – 66.4general purpose language – 66.4GEnie – 60.1, 62.1, 64.2, 65.3, 66.2, 66.5, 67.2, 67.3, 67.5, 68.3, 69.1, 69.5, 70.5, 72.3GEnie PSRT – 60.4, 60.7, 68.6, 69.6, 70.1, 71.1, 71.4GENIEVST.PS – 70.5Gerber Scientific – 74.3gimmie caps – 73.3Gleick, James – 64.7Godzilla vs the Night Nurses – 66.4, 73.1Gonzo Compile – 62.4Gonzo Justify – 68.4gonzo menu justify – 71.3GoScript – 60.1, 63.3Grainger – 66.3Grantham Polly-Stamp – 63.5gray book – 68.1Greek alphabet – 62.1

Hacker pc boards – 59.2hard coated drums – 69.2hard disk – 60.7, 64.3, 68.3, 74.2hard disk font utilities – 65.3hard disk guidelines – 74.1Hardware Hacker – 64.2hardwire handshake – 60.4Harwil – 68.5heat refusable fabric toner – 64.6helpline – 63.1Hercules Merigraph – 63.5Hewlett-Packard – 60.2, 61.1, 62.1, 71.1Hewlett-Packard LaserJets – 65.4Hewlett-Packard IID – 64.5, 65.1, 66.1,Hewlett-Packard IIID – 69.4Hewlett-Packard IIIsi – 74.1high ASCII code – 72.2

high core – 64.4High Speed SCSI card – 64.4high speed perspective letters – 67.5histogram – 66.3, 66.4histogram utility – 66.5HIX Corporation – 74.3hot glue – 62.1hot split plastisol – 74.3HP LaserWriter manuals – 67.1HP IIIsi – 71.2HPGL emulator – 66.3hstem – 62.5humidity – 66.3Hypercard – 73.3Hyper PS Tools – 70.1HyperStudio GS – 59.1

IBM printer interface – 60.3IBM to LaserWriter cable – 60.4Imagewriter emulator – 65.4ImageWriter LQ – 59.1Incredible Secret Money Machine – 59.2, 64.5, 72.2, 72.3inflection point – 68.6Infobook – 63.1initializedisk – 59.5INSPEC – 67.3insider resources brochure – 60.2intentional distortions – 63.6internal joints – 59.6internaldict – 62.1interpreted code – 68.2interpreter – 62.2Intro to PostScript – 65.5iron-on applique – 59.6

Jam recovery – 66.3Jensen Tools – 69.2JPEG – 70.3JPEG compression – 73.1JPEG Technical Specification – 70.1Joint Photo Experts Group – 73.2

Kepro – 59.3Kingsley-ATF – 70.1Klockit – 66.3Kroy Color – 59.3, 63.5, 65.4, 69.5, 70.4, 74.3

Laminating – 70.2laminating film – 65.4, 69.5, 70.4laminators – 69.4LaserJet emulation – 66.3LaserJet II – 61.1LaserJet IID critique – 65.1LaserJet IIP – 66.1LaserJet III – 62.1LaserJet IIID – 65.3

xviii

Index

Lasersetter Owners Association – 70.1LaserWriter Corner – 67.1, 68.1LaserWriter Mailing List – 67.1LaserWriter NTX – 74.2LaserWriter repair manual – 67.1LaserWriter SC – 59.1LaserWriter Secrets – 59.2, 60.2, 60.5, 61.1, 63.2, 67.1, 69.4LaserWriter system monitor – 68.1LaserWriter Technical Reference – 60.5Lazer Products – 59.3, 61.1least squares – 73.2, 73.4Leonard’s Distributors – 73.3level II – 71.2level II filters – 70.2limited VM workaround – 71.1linear fit – 73.4linear transformations – 63.6list brokers – 67.1liquid photopolymer – 63.5lossless compression – 73.1low cost printed circuits – 59.2LSI Systems – 73.2Lupin Software – 70.1LX cartridge pins – 69.2LX cartridges – 69.3

Mac Development Services – 73.1Mac LC – 67.1, 71.1, 72.1, 74.1Mac LC monitor options – 72.2Mac Research Users Group – 73.1machine language – 64.3Macintosh Development Tools – 68.1MacSciTech – 73.1magnetic refrigeration – 67.3mailing list rentals – 71.1Mandlebrot – 64.7mask – 61.5materials – 69.5math co-processor – 71.1Meals in Minutes – 68.4Meistergram – 74.1menu justify – 71.2, 71.4menus – 70.5Meowwrrr – 60.1meowwrrr pfftting – 67.3Merigraph – 63.5Midnight Engineering – 59.2, 60.2, 72.2Milk Crate from Hell effect – 66.3mold release – 59.2monogram – 73.3, 74.1Multi-Plastics – 69.6Multiple Master Typefaces – 74.1

Name tag – 70.1National Geographic quality – 63.4neon effects – 59.6network – 71.3

Newton-Raphson iterations – 73.4Night of the Living Disk CD – 67.1nixie rate – 67.1noisy histogram – 66.5non-ASCII screen code – 65.4nonlinear ashow – 63.6nonlinear transformations – 63.6, 68.5Novy Systems – 72.1NTX – 62.3NTX ROM upgrade – 65.1null modem – 60.4NURBS – 60.5

Opaque negative – 63.6open font paths – 64.1open Type I fonts – 62.1operating system – 59.1Option-F – 61.3overnight production – 69.4

Packaging and Converting – 69.6pad printing – 59.5page bitmaps – 60.6, 64.3paper curling – 66.3Paper Direct – 65.4, 70.5Paper, Film & Foil Converter – 69.6paper humidity – 66.3paper jams – 66.1Paper Plus – 61.2, 65.4, 70.5paper stretch – 65.5papers – 67.4parallel port – 60.4parchments – 70.5password blow up – 69.6path lookout – 70.3pathforall – 63.6, 70.3Pelsaer – 62.1, 62.2, 69.4pennants – 68.5per page toner costs – 63.2Peripherals ISV/IHV program – 71.1Personal LaserWriter NT – 66.1perspective – 63.6perspective lettering sampler – 67.4Photolabels – 65.5picture compaction – 64.7pixel line remapping – 60.7, 68.5pizza – 69.2plaintext – 61.5plastic laminating – 70.5plastic overcoat – 70.5plastisol screen inks – 69.5plotting pixels – 60.6point – 65.5popularity poll – 66.4Post-It notes – 68.1PostScript - A Visual Approach – 68.1PostScript BBS – 60.1, 64.2PostScript cartridge – 66.1, 66.2

PostScript fractal fern – 64.5PostScript insider secrets – 62.1, 70.1PostScript interpreter limited – 62.2PostScript Mac fonts – 65.3PostScript point rule – 65.5PostScript Ref. Manual II – 63.4, 64.1,70.2PostScript Rountable – 67.3PostScript Show and Tell – 59.3PostScript speed up – 60.5, 64.2, 74.4PostScript Tutorial – 63.4PostScript II – 64.1, 65.1, 68.6, 70.1, 70.2PostScript utilities – 61.5PostScript wish list – 68.1print buffers – 71.3print servers – 71.3printed circuit – 63.1, 63.2printed circuit drilling – 73.4printed circuit layout package – 59.3printer cable – 60.5Printers Ink – 72.3Printer’s Shopper – 69.6printing error trapper – 60.4, 61.4printing materials kit – 69.4printproc operator – 67.5probability selection – 64.7proc cacheing – 60.4, 60.6, 62.1, 64.3ProDOS Applewriter – 72.1ProDOS 1.9 – 69.1production costs – 69.4prolog – 62.2PS-810 – 63.1PS-820 – 63.1pseudocompiling – 61.1, 62.3, 63.3, 64.2pseudorandom sequence – 61.4PSRT – 67.3publisher’s committees – 69.3punch-and-go – 69.2punch and go method – 69.2Puss de Resistance – 60.1

QMS – 63.1QMS PS410 – 66.1QMS PS820 – 66.2quadratic – 73.4qualification – 66.5Quantum hard drives – 59.1Quantum Leap Systems – 72.1quit – 61.4

Random number – 61.4raw PostScript – 61.2, 72.3Recharger – 63.1, 67.2, 69.2red book II – 64.1, 67.1, 70.2redefining characters – 62.5Redmond Cable – 60.4redundancy – 73.1Reid, Glen – 67.1, 68.1

xix

Ask The Guru III

remote reset – 65.1returnable bitmaps – 65.1Roman alphabet – 62.1roundpath – 59.6, 72.3RS-232 – 60.4RS-423 – 60.5rubber stamp – 63.5rubbergrid – 66.5run length encoding – 60.7

Scale factors – 66.5schematic – 63.2Science of Fractal Images – 64.7Screen Printing – 59.6, 74.3SCSI comm – 64.6, 66.3SCSI hard disk – 62.1, 69.1, 74.2seac – 62.5Second Wave – 72.1self adhesive sheets – 69.6self-similar – 64.7serial comm – 61.3service manual – 67.1setscreen – 59.5settransfer – 59.5shared SCSI – 64.1, 65.2, 71.4, 74.2shoulder patches – 73.3shovelware – 67.4shrink wrapping – 68.4Sierra On-Line – 60.1SignCraft – 60.6, 74.3signed integers – 61.5sketchmode – 68.6slow pay reputation – 69.4SmartPort – 64.3, 64.4SmartPort commons code – 64.3Smith, Ross – 68.1space parity – 65.4, 72.2special education – 73.4specialty advertising – 73.4speed – 60.3spread – 68.6Stahls – 74.3star wars lettering – 63.6static cling materials – 60.6RA Stewart – 63.5stitches – 73.3stock history – 70.5stock history analyzer – 70.4stock investment program – 69.6stock market prices – 64.7strange attractor – 64.7strange denizens – 67.2strokeadjust – 70.1Struhl, Joseph – 60.6Sublicolor – 64.6subscript – 68.3superinsidestroke – 59.5, 59.6superscript – 68.3

superstroke – 59.4, 59.6, 72.3superfax – 63.4switchback assembly – 64.6SX engine – 62.1SX manual – 60.2system 7.0 software – 64.1

T-shirt printing – 64.6Tech Alliance – 63.2telecommunicating – 67.2text string remapper – 63.4textile – 73.3thermography – 69.5Thinking in PostScript – 67.1, 68.1third generation printer – 60.1, 60.2Thompson, Don – 59.3, 61.1Thompson-Shore – 72.3tinaja quest – 64.5toner atrocity – 60.3toner cartridge refilling – 69.1toner costs – 69.2total teardown – 69.2trade shows – 68.5trading model – 70.6traditional book publishing – 69.3Transfer Magic – 64.6transmitted data – 60.5trashed password repair – 69.6true compiling – 68.2twixt Bezier routines – 68.5, 68.6TWIXTBEZ.PS – 68.5IID click-to-clunk times – 65.2IID copypage problem – 66.1IIgs system software – 69.1two-way comm – 61.4Type I Charstring interpreter – 62.5Type I font – 60.7, 62.1, 62.5Type I Font Format – 61.5, 62.1, 64.1TypeWorld – 70.1typical trading session – 70.6tyvek sleeves – 70.5

UltraScript – 63.3UNADOBE.SIT – 65.3Unibind – 62.1, 69.4Unibit – 69.2Union Rubber – 69.2USENET – 67.3user paths – 70.1, 70.3USI Image Creators – 69.6

Velcro – 61.1VGA color monitor – 71.1, 72.2VGA monitor cable adaptor – 72.2video compression – 73.1Video Overlay Card – 59.2vinyl cutters – 73.4Vinyl Express – 60.6

vinyl lettering – 60.6virtual memory – 71.4

Wavelet compression – 73.1wavelets – 73.2Weishaar, Tom – 69.1WELL, The – 67.3white fill – 60.7world-wide research – 67.3WPL – 66.5

Xante Accel-a-Writer II – 74.1XON/XOFF handshaking – 60.4, 61.3