How can I emulate a ‘fake’ printer (driver) in Windows?

Posted on

QUESTION :

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?

ANSWER :

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.

New Port

I recommend the free and open-source PDFCreator

You can pause printing from PDFCreator’s control dialog

alt text

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.

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.

Leave a Reply

Your email address will not be published.