Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php:5) in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 6

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php:5) in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 6

Warning: include(/include/commonfunc.php): failed to open stream: No such file or directory in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 7

Warning: include(): Failed opening '/include/commonfunc.php' for inclusion (include_path='.:/usr/local/php5_6/lib/php') in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 7
ImageMAKER Technical Notes: Exact Printing, WYPIWYF
Welcome to ImageMAKERHome Product Information Component Info White Papers Specifications Technical Support Demo Download About ImageMAKER

The Leader in TIFF Imaging Solutions

Warning: include(/include/otherSites.html): failed to open stream: No such file or directory in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 90

Warning: include(): Failed opening '/include/otherSites.html' for inclusion (include_path='.:/usr/local/php5_6/lib/php') in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 90

Technical Notes: Exact Printing

Introducing the ability to fax exactly what you print.

The main issue with printing to a fax modem has always been the rendering of text. In particular, as you can see in this image, the formatting of the text is dependent on the resolution and capabilities of the printer used. This is perhaps more noticeable in the Windows environment, where "what you see is what you get" has been placed foremost.

The key to making Exact Printing work is in the way the driver reports its resolution and capabilities to the operating system, or to the program doing the printing. In Windows, this amounts to the same thing, as Windows is actually doing the rendering of text in nearly every case.

To this end, Exact Printing actually consists of two components, Printer Emulation and Resolution Conversion, which together make up the option we call Exact Printing, or What You Print Is What You Fax.

This article is intended to describe the various options available in each of these categories, how they affect the printed output, and how best to use the various settings, in some technical detail. There is a white paper available at http://www.imgmaker.com/content/whitepapers/ExactPrint.php, which covers topics outside the purview of this document.

Printer Emulation

Right-clicking on the printer in the Printers folder and selecting Properties will bring you to the Properties pages of the print driver; selecting Device Settings will bring you to the page shown here. You will see that we have added several new fields.

Under the Printer Operation heading there is now an Emulation setting and an Unprintable Regions setting. The Emulate Printer option is meant to allow you to select one of your existing printers; once you have selected one of them, the ImageMAKER print driver will report itself to Windows NT or Windows 2000 as being equivalent to the printer you have selected.

Specifically, if you select a LaserJet III printer as the printer to emulate, the ImageMAKER driver will claim to be capable of 300x300 pixels per inch, monochrome, and will report the same unprintable regions that the LaserJet reports to Windows. On the face of it, this does not seem particularly useful; however, it is the resolution and the unprintable areas that are the main items controlling the appearance of the printed page.

The unprintable areas are areas that the driver reports to Windows as being areas visible on the page where it cannot place any ink. When you open a device context for the printer, in order to create an image on the printer, you are actually limited to writing and drawing within the printable area. A program can query the printer to find out what the unprintable regions are. Most programs will use this information to place the text or images on the page in the location you have specified: given that you want to put the letter A one inch left and one inch down from the upper left corner of the page, most programs will determine that the printer reports 0.25 inches unprintable on the left margin, and 0.33 inches unprintable on the top, and will place the letter A three quarters of an inch (1" - 0.25" = 0.75") from the left edge of the device context's drawing area, and two-thirds of an inch (1" - 0.33" = 0.67") down from the top.

Since many programs compensate automatically for the size of the unprintable area, there is little difference in the output of most programs when a different unprintable region size is selected. However, as programs typically use a different unit to calculate the character positioning than the print drivers do, there will be some difference in position caused by round-off error.

The major advantage to having unprintable areas comes with those programs that actually don't compensate for unprintable areas; simple report writers and the like. These will simply write text to the printer device context, starting at the leftmost edge and continuing to the right edge. The result is that the report will start at the extreme left edge of the sheet and there will be no margin at all, unless there is a defined unprintable area on the left. If this is then sent to a fax machine, it is entirely possible that the left edge will be lost; most fax machines do have unprintable areas, contrary to specifications.

In order to retain compatibility with existing drivers, there are three print emulations available that don't match any printers on the system. These are:

  • (Custom): Basically a place-holder, this does not change any settings, but is an indication that some setting (either the resolution table or the unprintable areas) is set differently than any printer in the system
  • (Classic FAX Resolutions): This is the default; it sets the unprintable regions to 0, and the resolution table to the same values as our classic non-WYPIWYF FAX printers. The intent is that if you don't need exact printing or printer emulation, the print driver will work exactly the same as it always has.
  • (Near-FAX square-pixel): This provides a set of resolutions that are tailored for those people who must use square pixels, primarily people using Adobe and Corel products, but who do not want to incur the extra processing time that enabling exact printing / WYPIWYF incurs. The resolutions provided are those that create the least trouble to fax machines; although they will result in slight distortions in the output image, they should print correctly.

One specific note should be made regarding the near-fax resolutions. The three resolutions available here are 204x204, 200x200, and 196x196. For most purposes, all of these resolutions should be workable. 204x204 produces an image (when printed on a correctly-calibrated fax machine) that is 5% longer than expected, 196x196 produces an image that is 5% narrower than expected, and 200x200 splits the difference, producing an image 2% longer and 2% narrower than expected. We have found that some plain-paper fax machines reject the 200x200 and 204x204 images, saying that the image is too long for the page; some simply add a second white sheet to the output, others throw an error message and print nothing.

We recommend that you should select the printer you wish to emulate before you start the application you intend to use. If you change the printer properties, most applications are abl to detect a change message and reformat their text properly; it is not necessarily true that an application will be able to detect a change in the printer device settings.

Resolution Conversion

Resolution conversion is controlled from the Document Settings pages. It can be set on a system-wide basis by right-clicking on the printer in the Printers folder, and then selecting Document Defaults... (in NT4) or Printing Preferences... (in Windows 2000). In NT4 you then select the Advanced tab to get the display above; in Windows 2000 you click the Advanced... button. It can also be set from the Printer Properties button within an application; in that case, it affects only the documents prepared by that instance of the application, or the specific document if the application does not store device information between print jobs.

The way resolution conversion works is simple in concept. The image is generated at the resolution that Windows expects (in the case illustrated above, 300x300 DPI), and converted to a gray scale; the gray-scale image is then resampled to the scale that we want to use (in the case above, Fine Fax 204x196) and averaged, and the resampled and averaged image is then dithered to monochrome for printing. The settings on this page control how the initial gray-scale image is generated, how the resampling is done, and how the resampled gray-scale image is dithered.

Enabling resolution conversion is done by simply changing the state of the Resolution Conversion switch. This changes the resolution setting as well. The driver stores two resolutions, one used when resolution conversion is enabled, one used when it is disabled, so that it is possible to quickly see the difference between output generated at standard FAX resolution (204x196) and with resolution conversion enabled and set to mimic an existing printer.

The source image depth controls the generation of the gray scale image. The settings that are available will depend on the settings of the Image Rendering options, further up the page, as follows:

  • If you select an Image Rendering option that results in a monochrome image being produced, by selecting either Fast Windows Dithering or Monochrome (faster, less memory), the source image depth will be restricted to 1 bit.
  • If you select an Image Rendering option that results in a color image being produced (any other option), the source depths 8-bit (256 color) and 24-bit (16777216 colors) will be available.

These settings are particularly useful when converting continuous tone images or color images to TIFF to prepare them for sending via FAX. As with everything in life, though, there is a trade-off.

At 24-bits per pixel, the driver needs three bytes of kernel memory for every pixel in the image.This means that for a 600x600 DPI image of an 8x10.5" page (letter size with 1/2" unprintable areas all four sides), the amount of kernel memory required is 8x10.5x600x600x3 or 90,720,000 bytes (86.5 megabytes). By changing to 8-bits, that memory is reduced to 1/3 the space, 28.8 megabytes. And setting to a 1-bit dither results in dropping the memory requirement yet again, to 1/8 or roughly 3.6 megabytes. If Windows cannot or will not make sufficient memory available to the print driver to allow it to generate the image, the print driver will simply fail the print job. The control dialog response in this case will be an error code return of 0 (cancelled by print spooler).

It is unlikely that many real-world systems will have 90 megabytes of kermel memory available; using 300x300 DPI is more likely to be workable, that having a footprint only 1/4 the size (22 megabytes). Selecting an 8-bit image depth will also help, though of course that will degrade image quality; since there will be only 256 unique shades of gray that can be represented, the output image will be posterized to a certain extent.

If you are working purely with text, selecting Windows Fast Dither and the associated 1-bit omage depth is probably your best choice; the smaller memory footprint will increase speed by decreasing swapping the work image to disk. Of course, any gray areas will develop artifacts as they are dithered by the Windows dithering algorithm, and the dither pattern is then gray-scaled and resampled.

Another setting which will have an impact is the setting for the dither pattern. Whether you have selected an 8-bit or a 24-bit image depth, the generated image is a gray scale, which then must be converted to monochrome for output. The dither pattern or style you select will be the dither pattern or style that ends up in the output image. Shown below are examples of some of the dithering styles.

This is a screen cature of the original document (created in Office 97). Because a video screen has an assumed resolution of 72 or 96 DPI (depending on where you look in the Windows documentation), a screen capture at 200% should be about the same size as a printout at 200DPI; this one was at 150%.

The following samples were all produced on a Windows NT4 workstation with 128KB of memory and Office 97 or Office 2000. All have Exact Printing turned on and are emulating a HP LaserJet IIIP at 300 DPI. This is a sample using a 1-bit source depth and Windows Fast Dither:

Note that the gray scale now shows rectangular artifacts; this is because we are starting from a dithered image, gray-scaling, and then using a simple OR function to combine pixels. The artifacts are overflows in the conversion from 300 to 196 pixels in the vertical direction, and 300 to 204 pixels in the horizontal direction. Changing to an 8-bit source depth and error diffusion dithering, we see:

For some reason, Windows NT does not seem to want to index a palette, even if the palette indexing code exists. Since the default palette only contains two shades of gray, plus black and white, only four gray levels appear in the output. If we use an 8x8 dither pattern with this, we see the following:

If we change the source depth to 24 bits, and use error diffusion, we see the following:

And once again using 24-bit source depth and the 8x8 dither pattern:

Looking at the text in the above images, you will see that the text is at its crispest in the first case, where we have selected a 1-bit dither. This is because a 1-pixel line becomes a gray shade when it is resampled, and a gray scale is dithered; and many of the strokes in text are a single pixel wide or high. Where a one-bit dither is used, the OR logic used to re-create the image makes any pixel that was gray after resampling, become black. Because a one-bit dither is not particularly useful for graphics, due to the artifacts, we elected to use this OR ("all colors to black") logic, to improve the crispness of the text.


Warning: include(/include/footer.htm): failed to open stream: No such file or directory in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 327

Warning: include(): Failed opening '/include/footer.htm' for inclusion (include_path='.:/usr/local/php5_6/lib/php') in /home/content/13/11000713/html/imagemaker-webs/imagemaker/content/technotes/ExactPrint.php on line 327