Ezprint doesn't have a real home page or development site, but you can get the latest version here: http://mysite.verizon.net/l.bayuk/ezprint.html (Broken as of March 24th, 2012)You will find downloads for both Tcl8.4 and Tcl8.5.The Windows installer of the NAP package includes the ezprint extension.
Here are some example code fragments, which assume you've already loaded the extension.Make an option menu list of all available printers, with the user's default printer selected:
global selected_printer ... set selected_printer [ezprint defaultprinter] eval tk_optionMenu $widgetname selected_printer [ezprint listprinters] ...Send a file "report.pcl" to the default printer:
set f [open report.pcl] fconfigure $f -translation binary set p [ezprint open [ezprint defaultprinter]] fconfigure $p -translation binary puts -nonewline $p [read $f] close $p close $fSend a canvas $canvas as PostScript to a printer:
set pr [ezprint open $printername] $canvas postscript -channel $pr close $pr
Although ezprint is not stubs-enabled, Jeff Godfrey has touched up a version to make it so. [more refs](Ezprint is not stubs-enabled because it is built using the Borland compiler, and I do not think it is possible to make stubs-enabled extensions to Tcl using this compiler. This is because the Tcl core is built with MSVC. I probably should incorporate Jeff's patches to the source code anyway, using conditionals (not __BORLANDC__), but I have no way to test the result. -ljb)