Re: Controling printers at a detailed level



"Dennis" <junk@xxxxxxxxxx> schrieb im Newsbeitrag
news:%23kU6m6YkFHA.1048@xxxxxxxxxxxxxxxxxxxxxxx
> This may be the wrong forum for this question. If there is a better,
> please
> advise me.

Which is the right depends which technology you use to write printing code.

> Let me say that I've been a Windows C++ Win32 programmer for many years
> but
> I've never had to wander into the world of printers before.

If you've been a Win32 programmer for years, you should know where to start:
Platform SDK

> I suspect that the modern interface to printers has been abstracted so
> that
> all the vendor specific stuff has gone away. If that's true, then
> somewhere
> out there are a group of APIs that will allow me to do what I want. I've
> scanned the MSDN library to see what I could find but thus far I've come
> up
> with a blank. Can someone give me a gentle push in the right direction?

You have many options. Most vendor specific things have gone away, besides
the distinction between PS and PCL drivers. In essence, windows gives you
and hDC, and then you can draw on it:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_62ia.asp?frame=true

You probably wont do this directly with WinAPI, but use one of the higher
level abstractions, which can be found int:

WTL (CPrintJob)
MFC
..NET

Take a look here:
http://www.codeproject.com/wtl/uoth.asp
http://www.codeproject.com/printing/printingmadeeasy.asp
http://www.ondotnet.com/pub/a/dotnet/2002/06/24/printing.html

There are probably more classes, but that should be enough for most C/C++/C#
development.

Regards, Alex


.



Relevant Pages

  • Controling printers at a detailed level
    ... Years ago, in the pre-Windows days, I wrote code to directly control ... All these printer control codes were generally vendor ... I'd like to do something similar within a Win32 Windows program. ... I've never had to wander into the world of printers before. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Cloning printers
    ... them to transfer them to a new server to be taken a different location. ... Anybody knows if cloning printers is possible on unix? ... if they are using 3rd party drivers from HP (or some other vendor) you have to install those drivers in the same place on the new server. ...
    (comp.unix.questions)
  • Win32_Printer - detecting printer errors
    ... I am trying to detect error conditions that occur on printers that I have ... directly connected to a host (either via USB or LPT ports). ... vendor does correctly report these errors, as does printer properties (ex. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: OKI manufacturing problems?
    ... Thanks for the info Sergey. ... OKI agreed to exchange the ... printers that have the problem, and our vendor already picked them up. ...
    (comp.periphs.printers)