I am developing a Windows application that is going to print on
envelopes (C5 and C6 envelopes) based on data, that is retrieved from an
external order system.
The application is going to be running mostly automatic. So I need to
bypass the print setup dialog, that is normally used when printing with
wxRuby.
This presents me with some problems. I create a Wx::PrintData object to
control the printer, paper size, orientation, etc. like this (the
printer name is just an example, I hold it in a config file):
pd = Wx::PrintData.new
pd.set_printer_name(“Dell 3110cn”)
pd.set_paper_id(Wx::PAPER_ENV_C6)
The last line gives me this error:
`set_paper_id’: Expected argument 1 of type wxPaperSize, but got Fixnum
31 (TypeError)
The type wxPaperSize is not defined (as far as I can see), but it iś
something coming from the SWIG interface. I don’t really know how to
solve this.
If outputting the existing paper_id I get:
puts pd.get_paper_id.inspect
#SWIG::TYPE_p_wxPaperSize:0x2173c40
Which doesn’t really make it any clearer for me. So how should I do
this?
/ Carsten