ADC Home > Reference Library > Technical Q&As > Legacy Documents > Printing >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: I think I understand how to use the A: The LaserWriter driver works with many different PostScript printers, which can have different output resolutions. Currently, the driver always returns a range of 25 to 1500 dpi for legal resolutions, and a fixed resolution of 300 dpi. The range of 25 to 1500 means that the driver supports any resolution in that range. This is explained in Technical Note PR 07 - PrGeneral. What it means is that your application can ask for any resolution in that range, and the driver will support it. Given that LaserWriters and other PostScript printers can only support a limited number of resolutions, you may not get optimal results if you pick a resolution that is particularly bad for a printer, even if the driver supports it. You also will end up sending more data than is needed if you're generating bitmaps at a higher resolution than the printer can print. Some extremely high-resolution devices may be able to print at a resolution higher than 1500 dpi, and they are still supported by the LaserWriter driver. The range to return was chosen quite a while ago, and hasn't kept up with the times. Currently, the only way to get the actual resolution(s) supported by a
PostScript printer is to ask the LaserWriter driver for the PPD file, and parse
the file yourself, looking for the valid resolutions. The call to get the PPD
file is For parsing the PPD file, you'll need to consult the PPD specification maintained by Adobe. Rather than going to all that work, a better approach might be to change your code so you don't need to know the printer's resolution in order to generate high-quality data. There are various ways to solve this problem (none of which are perfect):
The approach you take is up to you. One last comment: if you decide to use PostScript, remember that it is a programming language. Depending on your needs, it may be possible to have the printer do the calculation, since the PostScript code that you generate must be run on the printer. |
|