Well, this is a complex problem that depends on interactions with the operating system. (Sorry, could not resist!)
The canvas-to-postscript solution only works for things drawn on canvas - it does not handle embedded windows. There are libraries that can convert the canvas to PDF, but I have no experience with them, and I donβt know if they handle embedded windows or not (I guess not).
pdflib, C, python tcl (, , Tkinter). , , , , . , - , , ..
Tk; , , , , , -, - .