打印时wx HtmlEasyPrinting编码问题

时间:2011-11-02 18:12:29

标签: python wxwidgets

我有一个带有非ascii字符的html文本,我希望它使用HtmlEasyPrinting模块打印。

printer = HtmlEasyPrinting()
text = '''
    <html>
    <head>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
         <b>&lt;</b>
         <p>&#233;</p>
    </body>
    </html>'''

printer.PreviewText(text)
printer.PrintText(text)

当我运行预览部分时,一切看起来都不错! (正确的编码应用) 当我尝试使用PrintText时,出现了问题,似乎非ascii字符在纸张/导出文件上得到了有趣的表示。

任何人都知道为什么预览工作正常,但不是打印本身?是否有一些设置需要应用?

wx.version = 2.8.11.0(gtk2-unicode) python 2.7

0 个答案:

没有答案
相关问题