Главная страница | назад





Article #16475: Getting printer capabilities

 Question and Answer Database
FAQ1475D.txt — Getting printer capabilities
Category :Printing
Platform :All
Product :
Question:
How can I detect if a printer is capable of printing graphics,
large bitmaps, and DIBs?
Answer:
You can call the GetDeviceCaps function and test the capability
against the RASTERCAPS capability. Note that if the Device does
support graphics, but does not support another raster capability such
as "StretchDib", Windows will handle the call by using lower level
graphic primitives to accomplish the task.
Example:
if (GetDeviceCaps(Printer.Canvas.Handle, RASTERCAPS) and
RC_NONE) = RC_NONE then
NoGraphics := True;
if (GetDeviceCaps(Printer.Canvas.Handle, RASTERCAPS) and
RC_STRETCHDIB) = RC_STRETCHDIB then
DeviceDirectly SupportsStretchDIB := True else
WIndowsWillSimulateStretchDIB := True;
4/2/99 11:23:56 AM

Last Modified: 01-SEP-99