In attachment you could fine a very sample application about how I am using wxPython printing facilities.
The method “print_order” shows how I am sending an html document to the default printer installed in the system.
The code seems to work but my printer after a while set the status of the printing as “completed” even if it is not even started (and the document will not be printed).
I’m running the code in ubuntu 12.04 and my printer is canon mg5250. The printer itself is running fine because the test print is ok
and if I try to print something using libre office for instance the document is printed fine.
So probably the code is wrong somewhere. The strange thing is that on python 2.6 and wxPython 2.8 the code ran fine.
In attachment you could fine a very sample application about how I am
using wxPython printing facilities.
The method "print_order" shows how I am sending an html document to the
default printer installed in the system.
The code seems to work but my printer after a while set the status of
the printing as "completed" even if it is not even started (and the
document will not be printed).
I'm running the code in ubuntu 12.04 and my printer is canon mg5250. The
printer itself is running fine because the test print is ok
and if I try to print something using libre office for instance the
document is printed fine.
So probably the code is wrong somewhere. The strange thing is that on
python 2.6 and wxPython 2.8 the code ran fine.
Was that on the same version of Ubutu or some other one? wxGTK has had a few different printing backends available, which is used depends on the version and if the desired libraries available at compile time. I don't remember for sure but 2.8 may have used the GnomePrint facilities, but that has been phased out IIRC. In 2.9 it is now using gtk_print which should be supported on all current linuxes IIUC. There is also the generic Postscript support in wx, but it will only be chosen at compile time if nothing else is available.
Now, I’m using ubuntu 13.04 with python 2.7.4 and wxPython 2.8.12.1.
In this version of ubuntu I’m using cups 1.6 and the printer now prints an empty document.
In the previous version of ubuntu I was using cups 1.5.3 and the printer wasn’t printing at all (even if the printer status was correctly at ‘working’).
In windows XP the sample prints the html document.
The current version of wxPython is ‘2.8.12.1 (gtk2-unicode)’
Do you think there is something wrong in the code ?
Thanks,
Emanuele Gesuato
···
Il giorno venerdì 9 agosto 2013 19:38:47 UTC+2, Robin Dunn ha scritto:
Emanuele Gesuato wrote:
Hi there,
I am using python 2.7.3 and wxPython 2.8.12.1
In attachment you could fine a very sample application about how I am
using wxPython printing facilities.
The method “print_order” shows how I am sending an html document to the
default printer installed in the system.
The code seems to work but my printer after a while set the status of
the printing as “completed” even if it is not even started (and the
document will not be printed).
I’m running the code in ubuntu 12.04 and my printer is canon mg5250. The
printer itself is running fine because the test print is ok
and if I try to print something using libre office for instance the
document is printed fine.
So probably the code is wrong somewhere. The strange thing is that on
python 2.6 and wxPython 2.8 the code ran fine.
Was that on the same version of Ubutu or some other one? wxGTK has had
a few different printing backends available, which is used depends on
the version and if the desired libraries available at compile time. I
don’t remember for sure but 2.8 may have used the GnomePrint facilities,
but that has been phased out IIRC. In 2.9 it is now using gtk_print
which should be supported on all current linuxes IIUC. There is also
the generic Postscript support in wx, but it will only be chosen at
compile time if nothing else is available.
Now, I'm using ubuntu 13.04 with python 2.7.4 and wxPython 2.8.12.1.
In this version of ubuntu I'm using cups 1.6 and the printer now prints
an empty document.
In the previous version of ubuntu I was using cups 1.5.3 and the printer
wasn't printing at all (even if the printer status was correctly at
'working').
In windows XP the sample prints the html document.
The current version of wxPython is '2.8.12.1 (gtk2-unicode)'
Do you think there is something wrong in the code ?
Sorry, I don't know what to suggest next, other than to try upgrading to 2.9. But if you want to stay with the stock Ubuntu packages that probably won't be an option for a while. You might try asking about it on wx-users.