[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing from WIN32



I have a project where a previous programmer has
produced some plots and text reports with an IDL gui.

I need to add printing for WIN32.

How might I go about this under WIN32?

Here's my guess...

    Add a button on the plot creation window.
    (This is interractive.  When the plot looks good,
    I want the user to hit a PRINT button)
    Then set_plot,'PRINTER'
    and re-generate the current plot to this device,
    then DEVICE,/CLOSE
    set_plot,'WIN32'
    will print out the plot, and return to GUI mode.

    Thats pretty much how I'd do it from UNIX.

    For the text output, I'll have to re-write
    the function(s) that send text to some sort
    of scrolling text widget, and have them write
    the text to a file...  then at the end, print the file,
    somehow check that it has been printed, then delete it.

   If I were on UNIX, I think I could write to a pipe
   to lpr for simple ASCII printing...  is there a similar,
   easy way to do this from WIN32.
   (Also on UNIX, there is usually a flag to lpr to delete
	the file when done printing..  something like that
        on windows would help)

   Or..   is there an easier way to do this in
   Windows?  Might the text widget have a print method?

            thanks in advance,
-- 
Aaron Birenboim
Albuquerque, NM
aaron@boim.com
http://boim.com/~aaron