For testing, my application needs to send a document to the printer. I don't really want to print this out, so I am looking for a 'fake' printer driver which could essentially print to nothing. I know that nul exists, but I also need the fake printer to support pausing. Any idea if the nul port can do this or any other fake printer driver?
Create a new printer and set its port to NUL:
You will need to add a new local port and just type
NUL: where it asks for port name.
As I had mentioned in the comments, Windows ( Vista & above) come with a XPS printer driver which you can use. Else install CutePDF which emulates a printer driver.
I recommend the free and open-source PDFCreator
You can pause printing from PDFCreator's control dialog
For completeness, Microsoft actually has two different virtual printers included with office, depending on which version of office you use: Microsoft Document Image Writer for Office 2003, and Microsoft XPS Document Writer for Office 2007 and newer.
Of course, like the PDF option these will both still create files on disk. But in the Windows world it's very likely you may already have one of these available.
You can use doPDF
doPDF is a free PDF creator that does what the name suggests, creates PDF files. Once installed it will allow you to convert any type of printable documents to PDF files. doPDF7.3 installs itself as a virtual PDF printer driver so after a successful installation will appear in your Printers and Faxes list and also in the list of All Programs. Using doPDF you can convert to PDF in two ways:
- Print to PDF via the virtual printer driver doPDF. You would do this exactly as you print to a regular printer, just the result will be a PDF file, not a printed piece of paper.
- Using the doPDF Startup window. doPDF has an executable file (accessible from the start program group) that you can run in order to start a conversion wizard.