Please make a runnable, small as possible, sample application that
demonstrates the problem.MakingSampleApps - wxPyWiki
--
Robin Dunn
Hello again,
I created a small app with only one textline within both problems (umlauts and newline-
command). The newline-command is not so important for me (splitting the line is a
solution) but I think it could be an indication to solve the problem with the umlauts I
have to use.
The preview is OK but the result of printing to file or printer is damaged like in
testprint.ps
Thank you
Again my configuration:
wxPython 2.8.10.1 (gtk2-unicode)
python 2.6.5
Linux 2.6.34.7-0.7-desktop x86_64 (opensuse)
You are correct about the newline, you'll need to split the lines and draw each individually. Otherwise the \n is written to the output stream as-is and although it may work okay with some printing back-ends, we can't depend on the printer driver always interpreting it correctly.
For the extended characters in your output it looks like utf-8 is being written to the postscript, but there is nothing in the PS that specifies that utf-8 should be used to interpret those extended characters. So what happens is that each byte of the multi-byte sequences is being rendered separately. I don't remember enough about postscript to know if it is able to use a non-ascii encoding nor how to tell it to do so, so please create a ticket for this at trac.wxwidgets.org so somebody else can eventually take a look at it.
Now for the good news... If wx is configured to use libgnomeprint when it is built then a different printing back-end will be used that does not have this problem. Apparently the stock wx packages from Ubuntu are not built this way, so sending a request to the Ubuntu package maintainer would be a good idea. You can build your own wxWidgets and wxPython in the meantime. There are instructions at http://wxpython.org/BUILD-2.8.html. Make sure you have installed libgnomeprint-dev and libgnomeprintui-dev packages and watch the output of the configure step to make sure that they were found okay.
···
On 3/8/11 3:48 AM, Michael Fuchs wrote:
Please make a runnable, small as possible, sample application that
demonstrates the problem.MakingSampleApps - wxPyWiki
--
Robin Dunn
Hello again,
I created a small app with only one textline within both problems (umlauts and newline-
command). The newline-command is not so important for me (splitting the line is a
solution) but I think it could be an indication to solve the problem with the umlauts I
have to use.
The preview is OK but the result of printing to file or printer is damaged like in
testprint.ps