Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Virtual Printer Driver Development

Posted on 2003-03-17
10
Medium Priority
?
913 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

571 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