Catch printing any document from any application (word, excel, pdf,...) to show printing options
-
Hi, I'm developing a cybercafe app. and i need to detect printing process from other aplications(Word,Acrobat,...) I need to send the job to any printer and select if it may be in color or BW. User doesn't use printer properties directly from its application(word,excel,...). He clicks on printing button directly. My trouble is catch this action to force him to show the destination printer and job color mode. I've been working with system.printing namespace to control the spooler: - When a new job arrives, I stop it. I obtain information about pages, printer,... but if I change any parameters like coloroutput property, it has no efect on the job when I resume it to finish the printing process (restart the job fails too) Any Idea ? Regards
-
Hi, I'm developing a cybercafe app. and i need to detect printing process from other aplications(Word,Acrobat,...) I need to send the job to any printer and select if it may be in color or BW. User doesn't use printer properties directly from its application(word,excel,...). He clicks on printing button directly. My trouble is catch this action to force him to show the destination printer and job color mode. I've been working with system.printing namespace to control the spooler: - When a new job arrives, I stop it. I obtain information about pages, printer,... but if I change any parameters like coloroutput property, it has no efect on the job when I resume it to finish the printing process (restart the job fails too) Any Idea ? Regards
Once you start a print job, it cannot be changed. The spooling data is specifically for the target printer and is written with the parameters chosen in mind. Once the job starts, it's too late to make any changes. The only thing you can do is pause or cancel the job.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Hi, I'm developing a cybercafe app. and i need to detect printing process from other aplications(Word,Acrobat,...) I need to send the job to any printer and select if it may be in color or BW. User doesn't use printer properties directly from its application(word,excel,...). He clicks on printing button directly. My trouble is catch this action to force him to show the destination printer and job color mode. I've been working with system.printing namespace to control the spooler: - When a new job arrives, I stop it. I obtain information about pages, printer,... but if I change any parameters like coloroutput property, it has no efect on the job when I resume it to finish the printing process (restart the job fails too) Any Idea ? Regards
After reading Dave's reply, it has occurred to me that you might be able to create a new print job using those parts from the original that you want to retain and the new ones that you want to use then deleting the original. I have no idea how you would do that but if it were me, that is what I would explore. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Hi, I'm developing a cybercafe app. and i need to detect printing process from other aplications(Word,Acrobat,...) I need to send the job to any printer and select if it may be in color or BW. User doesn't use printer properties directly from its application(word,excel,...). He clicks on printing button directly. My trouble is catch this action to force him to show the destination printer and job color mode. I've been working with system.printing namespace to control the spooler: - When a new job arrives, I stop it. I obtain information about pages, printer,... but if I change any parameters like coloroutput property, it has no efect on the job when I resume it to finish the printing process (restart the job fails too) Any Idea ? Regards
You could create a Virtual Printer (like those that create PDF file), and set it as the default printer. The virtual printer could then decide how to handle the print job. I am intending to write a similar Virtual Printer, but for processing emails. I cannot tell you how to start, because I am that stage myself.
Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.