-
Limit a print Job
Hi
We have just got a new product in from a external software house. It prints up a report on certain products, however this report is 11 pages long (there is no option to limit the number of pages), and we only require the first two. So what i need to do is write an additional prog to sit on the machine, that limits the number of pages printed on the report (or even any prog on that PC) machine to only 2. Anyone out there know a API to do this or even some other option.
Any help or ideas would be great as I am stumped on this one.
thanks in advance
Murtagh
-
Talk to the software vendor yourself and see if they have any ideas. There may be some options or something else you can set.
If not, well. There is no collection of api's to do this.
Since you probably don't want to write a printer driver, or rewrite gdi32.dll, you're stuck.
Because each process talks directly to the printer, therefore, you can't have a program sitting off in another process somewhere that sees the printstream and modifies it before it goes to the printer.
The most feasible approach is to create a systray icon that prints.
Set all of the printer output to FILE. The user runs the report. Then the user clicks on the icon to print - runs your code which opens & prints the file.