Hi all,
I wanted to report some happy news: after several months of work, I've
gotten native printing from the text and canvas widgets on Windows to
work in Tk's core.
Michael Schwartz and Harald Oehlmann were kind enough to freely share
code they've written to support printing on Windows, which allowed me to
gain traction after many weeks of false starts on my own. Their code
required some modification and simplification to work in the core, but
now basic printing of text files and the canvas widget using the GDI API
on Windows works well.
While there are many tasks left to be done in preparing a TIP for native
printing, Windows printing is the by far hardest part technically--it
must handle everything itself rather than delegating rendering of the
output to a system library such as CUPS. I have a Mac extension for OSX
printing that I will adapt for this project, and I am planning on making
the X11 code entirely script-based - a complete GUI wrapper around
lp/lpr, which will assume the existence of the CUPS printing library
(which is pretty universal on X11), and include a few fallbacks if it's
not there. The X11 version will be script-based just as the file dialogs
are.
Nothing's ready for testing yet - before I move on to the Mac and X11
versions, I want to complete the script-level "Tk print" API, write a
man page, and develop an addition to the widget demo library. I don't
think printing lends itself to unit testing because this package will be
deliberately focused on the dialogs (no headless printing), so
integration with the widget demo will be my focus. Getting all this done
before moving to Mac and X11 will make those platforms easier to finish.
The code is currently in the tk_print_gdi_only branch, but I plan to
merge it back to an earlier "tk_print" branch for further development.
Thanks for your interest!
--Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core