?
Solved

Virtual Printer Driver Development

Posted on 2003-03-17
10
Medium Priority
?
912 Views
Last Modified: 2013-12-03
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
0
Comment
Question by:alexzen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 9

Expert Comment

by:BeyondWu
ID: 8178395
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.
0
 

Author Comment

by:alexzen
ID: 8181600
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

0
 

Expert Comment

by:BLayman
ID: 8182855
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!
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Expert Comment

by:BLayman
ID: 8182878
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.
0
 

Author Comment

by:alexzen
ID: 8184412
Thank you very much, BLayman..
I downloaded the source code and am taking a look.
Good day.
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 8192787
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.
0
 

Author Comment

by:alexzen
ID: 8198381
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
0
 
LVL 9

Accepted Solution

by:
BeyondWu earned 2000 total points
ID: 8200028
alexzen,

Thanks for your points first.
for the big picture, you can refer the "Printer Driver Architecture" in MSDN.
for printer processor, and port monitor, you can refer "Introduction to Printer Graphics DLLs"
for printer spooler, you can refer "Introduction to Spooler Components"

>>what do we need to do with those components? I don't need to worry about printer processor, monitor and spooler???
It depends on the approach that you implement your vprinter. but anyway, I think you don't need to worry about spooler.

If you want to capture the print job, then convert it into PDF, you can't only capture the image with ddi function or other method, because with these method, the print-job already converted into a bitmap file, I think it's not suit for convert to PDF, maybe you need to get the strings before it become a bitmap, I haven't implemented this. but you can analyse the "Acrobat Distiller", it's implemented as a PostScript printer.


0
 

Author Comment

by:alexzen
ID: 8200138
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.
 
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 8200174
>>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.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question