[ACCEPTED]-How to create a virtual printer in Windows?-postscript
When I did it (which about 12 years ago) I 10 started with the postscript driver sample, replaced 9 all the postscript-specific stuff (in my 8 case, to write to a bitmap instead of generating 7 postscript commands).
I also wrote a custom 6 print monitor (the driver writes to the 5 spooler, which write to a monitor): my monitor 4 wrote to a file instead of e.g. to the parallel 3 port.
However, printer driver architecture 2 and/or the set of sample drivers may have 1 changed since then.
You can look to the 'minidriver' development 8 in the from Microsoft (Microsoft MDT), that 7 might help depending on your exact needs. If 6 the port you need to deal with (ie: you 5 are going to take the data from an existing 4 printer driver and want to process) you 3 could look to the source code for RedMon. It 2 doesn't support Vista/Win7 but might point 1 you in the right direction.
This book maybe help you Developing Drivers with the Windows® Driver Foundation
A list of my links
- http://www.codeproject.com/KB/system/driverdev.aspx
- http://www.microsoft.com/whdc/ddk/winddk.mspx
- http://jungo.com/wdusb.html
- https://web.archive.org/web/20130717135254/https://msdn.microsoft.com/en-us/library/ff554651.aspx
- http://channel9.msdn.com/posts/Rory/Driver-Development-and-Much-More-With-Mike-Calligaro/
0
One of the drivers you mention is open-source 2 (GPL), maybe you could explore its source 1 or adapt it: http://www.pdfforge.org/products/pdfcreator/download
Someone else already mentioned PDFCreator. Here's 6 a more specific link to their code that's 5 creating the printer, port and monitor. Despite 4 being in VB, I can follow it as someone 3 more used to C++, so I guess you can too. modPrinter.bas does 2 the leg work. modMain.bas, from about line 28 onwards, calls 1 into modPrinter.bas.
Create a Print Port Monitor, associate that 4 port with a printer, and you'll get the 3 data the printer driver sends to the port.
working 2 example of how is it done in Cpp and java 1 can be found here: http://www.mms-computing.co.uk/uk/co/mmscomputing/device/printmonitor/index.php
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.