views:

652

answers:

4

We are creating a batch application which sends its documents (Java Jasperreports) directly to a printer device, running on a Windows server.

To test the application and measure the performace, we where looking for a test or dummy windows print device. This device would not print to an actual printer but simulate a printer device in such a way that its buffer, number of pages printed per minute etc. can be configured and a report on the number of printed pages can be generated.

The only test devices found on the web print to pdf files, but a system as described seems hard to find. Does it exist?

+1  A: 

I'm not sure it'll give you all the reporting you want, but you can pause any installed printer on Windows, and it'll just spool the jobs to the queue without sending anything to the actual printer.

Michael Burr
A: 

Adobe PDF Printer

+2  A: 

A quick Google found this: http://www.mabuse.de/tech-vprinter.mhtml

Remou
Did find these kind of devices, indeed, but they don't tell much about performance, printer buffer status etc.
Jurgen H
@Jurgen: I see they come with source, maybe they are a good start for your quite precise requirements, if you find no other solution.
PhiLho
A: 

Could this be a solution to your problem?

  1. Set your printer driver to off-line
  2. Store the current time
  3. Generate your reports.
  4. Compute the difference between the current time and the stored time (1)
  5. Get the number of pages and size of the job with cscript prnjobs.vbs -l
  6. Compute time(4) / pages (5), pages(5) / pagesPerMinute or other statistics that you want.

Since all print jobs are spooled on the computer, your applications goal should (in my opinion) be to generate the reports to the queue as fast as possible. How long time it will take for the printer to print the pages depends on many factors, for example on the type (personal/department) and model of the printer, how much memory it has, the printer driver, what format the data is transferred in (postscript/pcl/etc), the interface (network/usb/etc), the complexity of the pages (text/graphic), if the printer is busy printing another job, is out of paper, etc...

My point is this: Without actually printing you can only get an estimate and you can calculate that estimate quite easily if you know get how many pages the document has and the size of it.

some