Is there a way to print to a buffer to facilitate batch printing? I have a report that is created within a grid. I want to be able to print this report for each participant in a batch (i.e. Print all) print job. This requires running the report for each participant in a loop and printing the current report (current grid contents) before entering the loop again.
This approach works, but the performance is slow because it prints only one report at a time, which also leaves a trail of "Printing Page 1" dialog boxes on the screen. Is there a way to go through this loop and kick the grid contents to a buffer and print all the reports at the conclusion of the final loop?
ADAdministrator Syncfusion Team September 27, 2004 04:07 PM
I do not think this will be a simple task.
There is nothing in our library code that would allow for direct printing to some print buffer to be then later printed to a printer. I may be wrong, but I don''t think the .Net Framework printing code (which our grid relies on to actually do the printing) supports this.
If you want to try something, you could print the pages to bitmaps, and then later print the bitmaps directly to the printer. But this would still require using the PrintDialog to set up the printing with you handling PrintPage to output the current page to a bitmap, skipping the default printing to the printer. You could then later print the Bitmaps with another PrintDialog.
We ship a sample that shows how you can get a bitmap from the grid for use in printing. It is not exactly what you might need, but can serve as a sample to get you started. The sample is Grid\Samples\In Depth\PrintToFit.