Technical Articles
Great find for Epson Printer owners
If you are like me, you own multiple Epson printers and absolutely love them. However, you may have also encountered an episode involving a cartridge that you know is full or nearly full yet the printer is telling you it’s empty.
Enter the Universal Chip Resetter from MIS Associates Inc. This handy and inexpensive (about $20 USD) device is a lifesaver when you consider the price of printer cartridges nowadays. Clip this on the cartridge and it will reset the chip so that the printer will read it as full. Check it out, you won’t be disappointed.
Cheers,
Skip
Technical Articles
Here is the final installment of the PostScript article by Mark Barnes. …When lines join for example, there’s the question of how should they join at the point? If you “zoom in” on a line, the pixels are square, so a line is really something of a long, thin, rectangle, depending on your line thickness. When two of them meet at a 90 degree corner, for example, if the endpoint of their centerlines meet perfectly, then you get a little notch at the tip of the corner. Well you might not want that, you might want it to fill in that little notch. PostScript has an operator to define that. Or you might want a nicely rounded curve at the corner. It can do that too. PostScript is really powerful and you can describe pretty much damn near anything with it on a page.
Obviously it would be tedious to write a PostScript program every time you print a page, so that’s why we have printer drivers. Computer operating systems generally have their own way of describing graphic elements on a screen, so printing often has to interpret that and translate it to PostScript. That’s what PostScript printer drivers do.
Here is a quote from an article published TODAY that highlights some of the things I was telling you today about printing from Windows computers:
“Many people make PDFs in the application they are working in, and they print to Distiller or to something else, and what’s happening underneath is that the application is printing through the Windows print subsystem through a thing called the GDI [Graphic Device Interface] print subsystem. A print driver converts that to PostScript, and the PostScript gets converted to PDF.
However, there are a number of features that PDF supports that you can’t actually get into the PDF files through that route. An example of that is transparency. Applications like PowerPoint and Word in Office 2003 support transparency, but if you try to make a PDF from those, you don’t get that transparency information even though PDF can support that transparency.”
And finally, one last thing you will encounter when talking about PostScript: the RIP. A “RIP” is a Raster Image Processor. A printer must have a Raster Image Processor to take the PostScript code that defines what a human wants printed on a piece of paper, and map those lines and curves and graphics into the pixel space supported by a specific printer. An imagesetter may have a resolution of 3000 dots per inch. The RIP is a chunk of code and a computer in the printer that maps out what dots of the 3000 x 3000 dots in every square inch of your page get ink, and then sends that as a bunch of raw data to the print heads as they pass over the page.
So some RIPs are built into a printer. But since computers are pretty damn powerful these days, RIPping can also be done on a computer, and indeed, many companies write a software RIP that takes PostScript files and eats them, and do lots of calculations to figure out what dots to ink, and then spit that directly to a particular printer. They also build stand-alone devices that do this. Check out the Canon ColorPASS Z600 here:
http://www.canon.co.nz/products/copiers/controllers.html
It is used to turn an expensive Canon color laser copier into a powerful network printer, too. Look at this whole line of stand-alone RIPs here:
http://www.copydynamics.com/colorpass.htm
Neat, huh? -Mark
Well, there it is! I hope you got something out of it, I know I certainly did.
Take care everyone,
Skip
Technical Articles
…100 scalefont sets the font size. Fonts are, by default, defined as 1 point tall. A point is 1/72 of an inch. So at a scale factor of 100, our font should be about 1.38 inches tall. But remember that font characters have ascenders and descenders, so the actual letterform sizes will be somewhat smaller, maybe 2/3 of an inch or so typical, for a 100 point font.
Setfont specifies the font dictionary to be used by subsequent character operators. Since “Palatino-Roman” is on the stack, it is used for the setfont operator.
100 100 moveto defines the location of the “current point”. The Current Point starts out at 0,0 in Cartesian coordinates, that is the lower left corner of a piece of imaginary paper. 100 100 sets it at 1.38 inches up and 1.38 inches to the right. This is where the baseline for the following text will start.
“show” is an operator that takes a string from the stack and paints the characters identified by the elements of the string on the current page, starting at the current point, using the font face, size, and orientation specified by the most recent “setfont” call. The default character spacing is set by the character’s width, which is an X,Y displacement that is part of the character’s definition. So basically, the line paints “Hello World!” on the page.
Finally, “showpage” transmits the current page to the raster output device, causing any marks painted on the current page to appear. After that, it performs some clean-up duties, like erasing the current page and re-initializing the graphics state (resetting the current point to 0,0 and the like.)
And that, in a nutshell, is a very simple PostScript program.
As you might imagine, a typical word-processor page worth of printed text an graphics is considerably more complex. Also, PostScript “painting” occurs on a theoretical page before “showpage” actually sends it to the printer. In the PostScript world, a page is “piled up” of its elements. So for example, if you coded a circle in the middle of a page and filled it with the color black, and then you coded a smaller circle centered on the first circle, and filled the smaller circle with white, the white would “overprint” the black, and thus you’d get something that looks like a donut on your page. This is a good thing, because white is printed on paper by *NOT* printing ink, and if it didn’t work this way, you wouldn’t get a donut, because the first circle would have been inked solid. Anyway, this a just a really simple example so you can see that a “real” PostScript program has lots of elements that handle lots of different things a person might want to do…
Cheers,
Skip
Technical Articles
…Here is a classic little PostScript program:
% Hello World in Postscript
%!PS
/Palatino-Roman findfont
100 scalefont
setfont
100 100 moveto
(Hello World!) show
showpage
% is a comment character, meaning the line will be ignored. Although we have some codes we use after a comment sometimes that we don’t ignore, which we use to gather various information about a print job, like determining up front what fonts are to be used in the document, so we can see if the fonts exist on the printer, or if they are in the PostScript file itself.
%!PS is the universal signifier that a PostScript program is about to follow. Some printers will ignore a print job unless they see it. We verbally say this as “Percent Bang P S”. The “!” is called the “bang” character.
/Palatino-Roman findfont tells the interpreter to find the Palatino Roman font on the printer. We used to put fonts in the printer, because fonts take up a bit of memory, and RAM was expensive. Also, networks were slow, so you wanted to have the font handy on the printer, rather than having to send the font to it. Nowdays, RAM is cheap and networks scream, so we prefer to send the font from the computer to the printer. One thing that they didn’t incorporate into fonts was the idea of font “Versioning.” So back in 1990 you might have bought an expensive laser printer that had Palatino-Roman version 1.0 in it. Later on, Palatino-Roman might get updated. Because face it, things change in life. For example, the Europeans got together to form an economic bloc and invented a common currency they named the “Euro” and gave it a symbol that looks like a big letter C with an = stuck though the side of it. Well we didn’t have that character before, so they had to update the font and add it. And then they might have even found a bug in their font and fixed that. And they might have added some upper-ascii characters. You never know. And so today you’ll be using a much-updated version of Palatino Roman on your computer, let’s call it version 6.0, and you use it in Microsoft Word or whatever, and you see your document on screen and it all looks well. But you print it to the 1990 laser printer and use the printer’s font, and your Euro characters don’t get printed, and your bugs aren’t fixed, and you don’t have your new upper-ascii characters. Well that tends to piss people off. So these days we have a complete 180 degree about-face: Now it is vastly better to have no font on the printer, and send the font in the print job. (Or otherwise work out a way to ignore the font on the printer and send the computer’s font to the printer.)
Still, some fonts are huge. Like Japanese fonts with over 4000 characters. So you don’t REALLY want to send the entire font. You’d much rather send just the 7 characters used in the phrase “Hello World” which are: HeloWrd. So we do that, we call it “Character indexing” and we build a new, tiny font file on the fly and call it a CID font, for “Character InDexed font” and it keeps things nice and fast. And that causes problems like if you make your document into a PDF and embed the CID font in it, and later someone wants to edit the font and make it say “Hello Bad World” and you don’t have the B or the a character. Anyway, you can see that font slinging is no easy business, and that’s what I wanted to impress upon you. But I digressed…
to be continued…
Skip
Technical Articles
As does happen on occasion, I ponder things to a ridiculously detailed level. The other day I was looking at large format plotters and *KNEW* that I wanted one with PostScript but suddenly didn’t know *WHY* I needed one with PostScript. Having my curiosity peaked, I decided I needed to know what all the fuss was about, so I called one of my Guru’s, Mark Barnes over at Adobe…
In this multi-part series, I will share with you the information that Mark sent me. So for all of you who have heard of, used, and knew the importance of PostScript but not necessarily why…. this is for you.
“What is PostScript?”
A: It is both a Programming Language, and a Page Description Language (PDL).
As a Programming Language, it is stack based, and uses Postfix notation, similar to a Reverse Polish Notation Calculator. In an RPN calculator, you enter the equation 2+2= as: 2 [enter] 2 [enter] +. It has the advantage of eliminating the need for parentheses in a calculation. For example 3 x (4+7) would be entered: 3 [enter] 4 [enter] 7 [enter] + x. The way it would be processed is as follows: You imagine each entry being stacked on top of each other. So you get a 3 at the base, with a 4 on top of it, and a 7 on top of that. Then you process the “plus” operation. Plus takes the first thing off the stack, (7 in this case) and “plusses” it with the next thing it takes off the stack (4) and pushes the answer 11 onto the stack. Then it processes the “times” operator, by taking the 11 off the stack, and “times” it with the next thing it takes off the stack (3) and pushes the answer 33 onto the stack.
For more on RPN, visit: Wikipedia
PostScript is an “interpreted” programming language. Meaning it isn’t Assembly language, it isn’t a string of ones and zeros. It is human-readable and gets interpreted by a PostScript Interpreter, which is a high-level chunk of computing code that typically lives in the ROM of a printer’s marking engine. As a Page Description Language, it exists to describe the appearance of printed pages. It is both Resolution Independent and Device Independent. (Although devices differ a lot, and it is relatively easy to produce PostScript code that will produce expected results on one device and not on another device, but in general, the language itself is device independent. What you *do* with it is another matter.)…
To be continued.