Board index » cppbuilder » Gloabal Printer and Plotters
|
William Westbrooks
CBuilder Developer |
|
William Westbrooks
CBuilder Developer |
Gloabal Printer and Plotters2005-03-30 10:49:50 AM cppbuilder20 Hi I am using the gobal TPrinter* to print a bit map image. When I use my HP Office Jet color printer it works fine. When I try to print the bit map image with a HP Designjet 500 plotter and another plotter I don't have the model off hand, I get a memory error. is there a known problem with plotters. |
| Damon Chandler (TeamB)
CBuilder Developer |
2005-03-30 11:34:00 AM
Re:Gloabal Printer and Plotters
Hi William,
What code are you using to print the bitmap? Before troubleshooting other areas, you should first make sure that you're using a DIB and StretchDIBits(); see... graphicsbb.itgo.com/BitmapPrint.html www.code4sale.com/joehecht/prndib.htm I've never printed to a plotter before, but you might have to use banding (i.e., printing the image a strip at a time) to work around the memory issues. Good luck, William Westbrooks wrote: QuoteI am using the gobal TPrinter* to print a bit map image. When I use my |
| William
CBuilder Developer |
2005-03-30 10:25:47 PM
Re:Gloabal Printer and Plotters
Hi
Here is the code if (x1/y1>x2/y2) { // Use Page Width to size the rectangle MapWindowRect1 = Rect(200, 200, x2 + 200, x2 * y1 / x1 + 200); } else { // Use Page Height to size the rectangle MapWindowRect1 = Rect(200, 200, y2 * x1 / y1 + 200, y2 + 200); } Prntr->BeginDoc(); Prntr->Canvas->StretchDraw(MapWindowRect1, MergedBitmap); Prntr->EndDoc(); "Damon Chandler (TeamB)" < XXXX@XXXXX.COM > wrote in message news:424a1e1f$ XXXX@XXXXX.COM ... QuoteHi William, {smallsort} |
| Damon Chandler (TeamB)
CBuilder Developer |
2005-03-31 12:43:18 AM
Re:Gloabal Printer and Plotters
William,
You'll want to use the StretchDIBits() GDI function instead of the StretchDraw() method. See if the code on the first link I provided performs any better. HTH, William wrote: QuotePrntr->BeginDoc(); |
