views:

116

answers:

2

I have a requirement where my client want to install a custom "Print to File" printer (apparently MS has an SDK for this?). They want to be able to install this as a kind of "application" so that if someone chooses to print to this printer, they have to answer a few questions, and the file gets "printed" to a path of our choosing. (we will then do some other things with the file such as rename it and SFTP it)

I have tried googling, looking for things such as "customize print to file" and I have found nothing. Does anyone have any experience with this and can give me a kick in the right direction?

EDIT: I would rather have a c# oriented solution but I am willing to take anything right now.

Edit 2: The idea is for this "custom print driver" is for a document imaging company to provide an easy method for their customers to store/archive documents. The idea, is that the customer, if they want to store/archive a document, they would print, from standard windows applications such as Word, Excell, Acrobat Reader, Web Pages, etc., to the "company X" printer driver. When doing so, the document would get "printed" to a file in a specific location that another application (which has a filewatcher service on it, which would rename it and send it to the SFTP server), knows to watch. The document that is printed to the file, should ideally also be able to come out on paper (AKA just like normal). When printing to the "Custom print driver", we also need to have a form filled in which would provide meta-tags for the archiving system, which would also be uploaded to the document imaging system.

I am not looking to recreate a printing application, nor am I looking to add "printing" into a custom application. This needs to work at the Windows level.

I have no problems with the SFTP, FileWatcher, Alchemy integration (the document archiving application) or the document renaming portion. It's the "custom print driver" that I am having issues with. This is all compounded by the fact that when installing the application, I need to automatically install the "custom print driver", and configure it during the install process. Essentially the solution needs to be installed as a printer available under "My Printers" and should be available for any type of document, Word, Excell, PDF, etc. Oh, and it needs to be availabe for XP, Vista, and Windows 7 . . . . :(

Thanks in advance for everyones help. I have a feeling that this one is going to be a doozy :(

A: 

What kind of customization you are talking about? Can't you use the .Net inbuilt one?

Ngu Soon Hui
yes, but no. please see second edit
andrewWinn
A: 

Hah! I knew I'd seen at least one...

ActMask Virtual Printer Driver

Can't make a recommendation of any sort not having tried this particular toolkit - but it would appear to me to bear a strong resemblence to the sort of solution you're after.

Murph
Sorry, I am not writing an application that needs the ability to "print". I am trying to create a custom "printer", as in when you go to Fil->Print, and you can choose what printer to send the file to. I want to create my own "printer" which will print to disk (rather than paper), at a destination that another application knows about.
andrewWinn
Erm, yes - that's exactly what the toolkit I've pointed to does, they provide a redistributable *printer driver* that will output to various formats (you need to choose something appropriate) and then will call a specified application - i.e. your code - with a parameter file to allow you to post process the generated document.SO: instead of *you* writing a custom printer (which is not something I'd like to undertake) you take a proven solution and combine that with your custom logic to achieve the desired result. Easier and faster...
Murph