I'm sure that my problem was resolved already on our forum, but I can't find it.
How can I print image without saving it to file?
I need to create some graphs and print them. I don't want to use temporary files.
Regards, Marek
Print image from memory
Moderator: Rathinagiri
Re: Print image from memory
Marek, maybe something like this (I have not tested, I write from my head on my smartphone.)
Code: Select all
//hBitmap := is some memory bitmap handle like GRAPH BITMAP (...) STOREIN
select printer default preview
start printdoc
start printpage
hDC := OpenPrinterGetPageDC()
BT_DrawBitmap ( hDC, 100, 100, 500, 500, BT_STRETCH, hBitmap )
end printpage
end printdoc