I am printing my grid using the following code:
With UltraGridPrintDocument1 .Grid = ug_CommissionDetail .FitWidthToPages = 1 .DefaultPageSettings.Landscape = TrueEnd WithUltraPrintPreviewDialog1.Document = UltraGridPrintDocument1UltraPrintPreviewDialog1.ShowDialog()
The grid fills the landscape page nicely, but it is very slow.
When the grid goes over 1 page I get an InsufficientMemory error on my printer.
This HP is an office printer with 16MB memory.....should be sufficient.
I have also tried this printout using the PageSetupDialog and PrintDocument with the same issues.
What am I doing wrong?
Does the StyleLibrary have anything to do with this?
I agree, it seems very unlikley that it would be a printer driver problem if it happens on 3 different printers.
Can you create a small sample project which demonstrates the issue? If so, I can try it out here and see if I get the same problem.
Mike,
I am using UltraGridPrintDocument.
All three printers are different so there are three different printer drivers involved. Can't see that all three would have the same bug, but HP has been known to do this.
I've never heard of anything like this happening before. I don't see how this could be an issue with the UltraPrintPreviewDialog, though. The dialog just displays a preview of what will print. It gets the preview from the PrintDocument you supply.
Are you using the UltraGridPrintDocument? Even if you are, this class is derived from the DotNet PrintDocument class and it prints one page at a time and then sends that information to the print driver.
So if it's sending more information to the printer than the printer can handle, I can't see how the grid, the UltraGridPrintDocument, or the UltraPrintPreviewDialog could be involved in this interaction. This sounds more like a bug in the print driver - or at least it would if all three printers you tried it on are the same and using the same driver.
I am using 2008.1.2161.
The error is not a PC or Infragistics error.
The printer will blink for about 1 minute and then print a PCL XL error page. All it says is
Error: InsufficientMemory
Operator: text.
Position: 245107
It would take me a little while to create a sample pgm.
I have tried 3 printers with this output. the first had about 2 MB and it choked. the second had about 16MB and it choked. the third has 32MB and it printed fine.
So I changed the AppStyle right before printing to reduce the amount of graphics. It will print on the 16MB printer now. But this is not a solution.
It seems that the UltraPrintPreviewDialog is sending the document as one continuous page and not breaking it up into pages. The printers are set up for spooling and that should force them to print upon pagebreak. But it acts like there are no pagebreaks being sent.
What version of the grid are you using?
I can't see any reason why this should fail with the information you listed here.
What exactly is the error message you get? Is there a call stack?
Can you duplicate this in a small sample project and post it here so we can take a look?