printing

Thanks,

you give me some clue.

I resolve this problem (it takes some time to study documentation and wxpython demo :-))

···

#----------------
printout = wxHtmlPrintout("aaa")
printout.SetHtmlText(htmlstring)

pd = wxPrintData()
pd.SetPaperId(wxPAPER_A4)
pd.SetOrientation(wxPORTRAIT)
pd.SetPrinterName('')

pdd = wxPrintDialogData()
pdd.SetPrintData(pd)

printer = wxPrinter(pdd)
printer.Print(self, printout, False)
#----------------

I hope this helps to somebody...

Stano.

Robin Dunn wrote:

Stano Paska wrote:

Hi,

I have wxHtmlEasyPrinting and I need print some html string WITHOUT appearing Print dialog.

printing = wxHtmlEasyPrinting("aaa", None)
aaa = printing.GetPrintData()
aaa.SetPaperId(wxPAPER_A5)
aaa.SetOrientation(wxLANDSCAPE)
aaa.SetPrinterName('')wxprinter
printing.PrintText(htmlstring)

It is possible?

No. The wxHtmlEasyPrinting unconditionally passes prompt=True to wxPrinter::Print.