Sending to the Printer

BlitzMax Forums/BlitzMax Programming/Sending to the Printer

Chroma(Posted 2005) [#1]
Anyone know how to print to a printer from BMax?


Chroma(Posted 2005) [#2]
Is MSPaint.exe still the only way to print stuff?


daaan(Posted 2005) [#3]
I too would like to know. Maybe via custom .dll?


Perturbatio(Posted 2005) [#4]
It should be perfectly possible to do it with the WinAPI (or Carbon/Xlib)


Chroma(Posted 2005) [#5]
Cool...wish I had a clue how to do that lol.


ozak(Posted 2005) [#6]
What about GadgetPrint? (Or is it MaxGUI only :)


skidracer(Posted 2005) [#7]
MaxGUI only but yes, the simplest way to print is to construct an html page, load it into an HTMLView and call GadgetPrint.

A PrintPixmap routine that did such a thing would be handy, or some specific code for each OS, windows printers aren't much fun to talk to that's for sure.


Perturbatio(Posted 2005) [#8]
If we had access to the GDI in an easy package, it would be relatively easy to print.


Chroma(Posted 2005) [#9]
What windows .dll handles the printer? I'll take a shot at this.


skidracer(Posted 2005) [#10]
There are somethings best compiled in C, importing such functions into BlitzMax being pretty easy.

The following source (untested) is what i found after googling PRINTDLG GlobalLock and gives you an idea of the amount of code you are dealing with in regards to performing print jobs.

http://home.wanadoo.nl/hhaydn/Winatom/html/Prncdlg.htm


ozak(Posted 2005) [#11]
Why not support print on gadgets? In Visual Basic any form can be printed by calling it's print function (VB .NET. Not that I use such horror ;)


Chroma(Posted 2005) [#12]
Mad props to anyone who finally quenches the thirst to print properly in blitz.

I'm *guessing* calling the print setup and print command would be similar to calling the color requester. /duck


woolybuger(Posted 2007) [#13]
calling scanner would be nice too!


GfK(Posted 2007) [#14]
Kanati did a printer DLL for Blitz/3D/Plus. Not sure how much work would be involved in using it in Max.