Printer Type: LaserJet or InkJet

michaelg1971
michaelg1971 used Ask the Experts™
on
Hi, guys.

Is there any Windows API function which tells you that the printer is laserjet or inkjet ? Any other way to find out ?
I need to find out, because I'm using GDI objects (VC++ 6.0) to draw graphs and the width pen is displayed differently on different printers (e.g. on laserjet printers work fine, but on inkjet printers the width pen becomes too big !).

Any suggestion would be great !

Michael
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I think your problem is NOT ink jet vs. laser but merely invalid assumptions about the different printers and their capabilities.

The APIs in Windows that may be able to help you are:

GetDeviceCaps()
DeviceCapabilities()

But I think you'll need to do some invetigating into just which of the parametrics are different from your assumptions and are causing this problem.  My guess is that you'll eventually see SOME ink-jet printers behave as you want and SOME laser printer misbehave as well.

Author

Commented:
That's exactly I need, the parametrics, it's an emergency. The width pen behaves in the same way on some inkjet printers while doing some tests.

I'll give to anybody all the points, just to show me exactly this and that. I looked at the DeviceCaps and DeviceCapabilities, but there is no indication that points to distinguish the printer.

Michael

jkr
Top Expert 2012

Commented:
Use 'GetDeviceCaps()' to retrieve the horizontal and vertical resolution of both printers. I assume your problem is due to an anisotropic resolution (e.g. 600x300 instead of 600x600) of the printer.
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Author

Commented:
Thank's jkr, but you're wrong. The resolution is perfectly fine, there is no anisotropic resolution.
jkr
Top Expert 2012

Commented:
>>but you're wrong

So, what resolution does the inkjet actually have?

Author

Commented:
Canon BJC-5100 Buble Jet Printer

Default: 360X360 dpi
Maximum: 720X720 dpi

int GetDeviceCaps(  HDC hdc,    
// handle to DC
  int nIndex   // index of capability
);

try  following as nIndex

LOGPIXELSX
ASPECTX
SCALINGFACTORX
COLORMGMTCAPS
and test whether it gives any clue

Author

Commented:
I' ll try it and let you know.

Thank's vijay_visana.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial