[Tutor] How to get a Tkinter window to print a color copy of itself as a .pdf file?

boB Stepp robertvstepp at gmail.com
Wed Apr 15 19:07:46 CEST 2015


On Wed, Apr 15, 2015 at 11:13 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:

[...]

> Your problem is that Tkinter does not really support the concept
> of printing to hard copy. Other GUI frameworks (like WxPython)
> do this much better. So anything you do will be a bit of a kluge.
> There are some valid reasons for this: printing is extremely OS dependant.
> And Tk as a cross OS platform doesn't want to have
> to deal with all the complexity(*).

This is sounding like developing a platform-independent program
involving Tkinter and requiring printing is no easy task. Fortunately
my efforts need only run successfully on the Solaris 10 OS.

[...]

> Printing UI images and WYSIWYG type output is one of the few triggers that
> drive me to WxPython. It handles it much more easily than Tk.

I will have to keep wxPython in mind. It does not help me at work, but
for non-work projects it might be very useful. However, I should work
on mastering Tkinter first, as I am sure that all of the principles I
learn here will be generically useful for any GUI programming.

Thanks, Alan!

-- 
boB


More information about the Tutor mailing list