I want to create a software which can accept Print Jobs from other computers, and then route those print jobs to PCs on LAN with printers attached.
How it's going to happen -> 1- When that software called "Virtual Printer" is installed on a computer "X", Windows should think that it is a print driver/attached printer to that computer. 2- Then administrator of that PC goes to "Devices and Printers" in windows and select the "Virtual Printer", right click and view properties and select the check box "Share this printer" 3- Now other PCs on the LAN can see that there is a shared printer call "Virtual printer" in the LAN connected to the computer "X" 4- So they can send print jobs to this "Virtual Printer", by selecting "Virtual Printer" when they need to print something.
How can I write this program (possibly c#) to Appear itself as a printer to the Windows, and then Accept incoming print jobs and send them to desired computers with printers attached.
I don't have any idea how to code this thing, and I don't have knowledge either, please help me with some resources, codes or sample projects or at least samples similar to this. Thanks
This can be done combining four ingredients in the right way:
gs871w{32,64}.exe
) to convert PostScript to image;redmon17.zip
) to serve as the 'printer port monitor';The printqueue will be using the 'Redirector Port Monitor' (RedMon) to channel the incoming PostScript jobs to a program/application/batchscript of your choice.
What's left to do is your job: write a simple program/application/batchscript which does three things:
Here is a document that describes some of the basic need-to-know things regarding RedMon:
If you are a newbie to Ghostscript, you'll probably have the biggest problem with constructing a commandline that would do what you neeed. Here are some examples.
The first one converts data arriving at standard input (stdin,
-
at the end of the command) into single-page, black+white TIFF G4, with a resolution of 600dpi, where each page is a separate file, namedpage_001.tif
,page_002.tif
, etc.:Here is a Ghostscript commandline which would generate the same output, but this time as one single multi-page TIFF G4:
Oh, you don't want black+white G4 TIFF, but colored TIFF, 32-bit CMYK? OK, use a different output device for Ghostscript:
You want JPEG? Sorry, there is no such thing as multi-page JPEG. But single-page no problem:
There is a commercial component that allows you to create virtual printers in windows. See http://www.colorpilot.com/emfprinterpilot.html
Looking back at my first answer in the light of your original question, I do no longer understand why I put so much emphasize on a "convert incoming job to an image"-stage. Probably because you had mentioned in one of your answers that you wanted a functionality similar to imageprinter.
Anyway, since you now made clear that your main goal is to forward all incoming jobs to other computers (which have the real printers installed) -- this can also be achieved with:
The difference now is twofold:
The Ghostscript command would be similar to: