Link to home
Start Free TrialLog in
Avatar of alexzen
alexzen

asked on

Virtual Printer Driver Development

Hello,

I am desparately looking for information on 'virtual printer driver development'.

What we want to develop is a virtual printer driver that creates a PDF file or a TIFF/JPG image file from any windows application, for example, IE or Word, etc. that has printing function.

The big picture is like this: Let's say you want to print a web page from the Internet Explore, so you select the print menu. The print dialog box shows up and you select the virtual printer which we want to develop, then the contents of the page will be converted to a PDF file or TIFF / JPG image file according to the GUI setting which will be showing after the user clicks the print button. The virtual printer GUI might include a 'Send Email' feature too.

There are already many products I was able to download and try, but I haven't been lucky on how to develop such products. I just simply do not know where to begin. It would be excellent if there is a third party DDK (driver development kit), so that we don't have to write everything from the scratch.
Any input would be welcome. Thanks.

Lost mind
Avatar of BeyondWu
BeyondWu
Flag of United States of America image

First, you should study all the samples of printer under DDK.
Second, I can tell you that the SURFOBJ actually is a bitmap! you can dump the SURFOBJ into a bitmap file and I already implemeneted such a virtual printer driver.
Third, there are lots of method can approach it.You also can implement a printer processer.
Sorry, I only can tell you these info.Hope this help you.
Avatar of alexzen
alexzen

ASKER

BeyondWu,

Thank you so much, and what you told me is indeed a great help in that it points to where I should start to look at. I sure will install Window DDK and study the samples related to printer driver development.

Havign said that, since I am just starting on developing a virtual pritner driver, could you be kindly enough to tell me what would be a big picture here???
(Such as some sort of tasks that are involved here..)

Will it be like capturing print stream(?) and process/covert to a PDF or image files?? (I know, I sound like a manager who doesn't know anything about, and all he does is BS and no concrete direction/knowledge and no repect on the actual people who bear the burden of making-it-happen.. I hate those guys with passion.)

And I kind of lost on some terminology. What's different between printer processor and printer driver??

Thank you again, BeyondWu, and have a great day.

alexzen

Turbo Power's Async Professional (www.TurboPower.com) includes a printer driver example and installation program.  It works well.  I've use it as a print to fax driver for years.  Turbo power is leaving the business and has released most of its source to the OpenSource site SourceForge.net.  

I've not looked but you should be able to find what you need there and it is free!
Oh- the fax printer driver is included as the example which of course takes what you send to it and converts it to a bit map.  You could easly save that bitmap out or convert it to a Tiff/JPeg whatever.  

I use the Delphi version but the Delphi syntax is easily transferred to most other languages that have access to API calls.
Avatar of alexzen

ASKER

Thank you very much, BLayman..
I downloaded the source code and am taking a look.
Good day.
alexzen,
Sorry for the later response.

>>>could you be kindly enough to tell me what would be a big picture here???
From the architecture of Printer Driver. search "Introduction to Printer Graphics DLLs" in MSDN. I think there at least two places can capture the print-job's image.
First, the Printer Processor,the processor will receive a EMF format file when printing, I think you can convert it to any formats.
Second, Rendering DLL, you can hook the ddi function, I remember there is a ddi-hook sample, you can refer it. in this dll, you can dump SURFOBJ as a bitmap.
Avatar of alexzen

ASKER

Dear BeyondWu:

Thank you for your comments so far, and you will get my points whether or not you comment on the questions below.

As I am gaining some knowledge on the virtual printer driver development, I still feel like I am in the middle of nowhere, because I couldn't get the "big picture" yet.

I was reading the 'Windows 2000 DDK Documentation' and got confused between terms and concepts such as printer processor, printer monitor or printer spooler, etc.

So my first question would be "where does this printer driver fit in among all these components, and where should I focus on when we actually implement it? - the writing code part -"

I mean, when it comes to develop a virtual printer driver, what do we need to do with those components? I don't need to worry about printer processor, monitor and spooler???

Also I am not sure which sample would be best fitted for my objective: writing a virtual printer driver that converts print job/stream from application to a PDF or image file.
 
Thank you for all your help, BeyondWu, and have a great day.

alexzen
ASKER CERTIFIED SOLUTION
Avatar of BeyondWu
BeyondWu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alexzen

ASKER

Thank you, BeyondWu, for all you help.
Before I close this question, could you please tell me which sample you think would be the best bet to stick to in the DDK under print directory?? And where could I find information on "Acrobat Distiller"?
Bid you well, BeyondWu.
 
>>And where could I find information on "Acrobat Distiller"?
If you installed Acrobat, there will be a "Acrobat Distiller" under the printer folder. There are no information about it, but you can analyse it(dump/debug... It maybe illegal:).
for ddihook, refer the "oemuni" sample.