[Tkinter-discuss] Text to postscript
Michael Lange
klappnase at web.de
Tue Jun 18 05:16:12 EDT 2019
Hi,
On Mon, 17 Jun 2019 12:16:49 +0000
Vasilis Vlachoudis <Vasilis.Vlachoudis at cern.ch> wrote:
> Hi all,
>
> Canvas has this nice method to convert it to postscript, which is
> perfect for printing. Is there something similar for Text(), I could
> not find anything internal but if there is something external to
> convert to html, ps, pdf it would be nice.
maybe you could use tkimg to create a "screenshot" of the widget in
postscript format.
To enable tkimg's "window" handler once it's installed you just need to do
something like
root.tk.call('package', 'require', 'img::window')
early in your code.
IIRC by default tkimg's "window" handler will include only the visible
part of the widget, but here:
https://wiki.tcl-lang.org/page/Img
George Petasis posted a recipe that seems to be able to capture the whole
contents of a canvas widget. I don't know how well this actually works
though and if it can be done with a Text widget in the same fashion.
Best regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
History tends to exaggerate.
-- Col. Green, "The Savage Curtain", stardate 5906.4
More information about the Tkinter-discuss
mailing list