{jprint.tcl
Introduction
The jprint.tcl library is distributed as part of the jstools package.  It lets you print text or PostScript to a printer, providing the user with a confirmation panel that shows how the text will be printed.  It works in conjunction with the jstools Global Preferences panel to let the user select a printer (or output file) and method of printing.

This document describes jprint.tcl version 2001.02.10.
Usage
Accessing the Library
In order to use the jprint.tcl library, it (and any other libraries it depends on) must be in your Tcl auto_path, described in tclvars(n).  Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section  of The jstools Libraries.
Credits and Copyright
Author
Jay Sekora 
js@aq.org
http://www.aq.org/~js/
Copyright
The library is copyright © 1992-2001 by Jay Sekora, but may be freely redistributed under the conditions at the top of the file.
Overview
Procedure
::jstools::print - print text
::jstools::print_ps - print PostScript
::jstools::print
Usage
	::jstools::print [options]
Options
	-title title  (default Print)
	-data text  (default {} - not really optional)
Example
	::jstools::print -data [.text get 1.0 end]
Description
This prodedure creates a popup confirmation window showing the user how data would be printed, given the current printing preferences as set in the jstools Global Preferences panel, and asking the user whether to print.  If the user clicks OK, data is sent to the appropriate printing command or output file.

If title is specified, it will be the title of the panel, for use by the window manager.

If the global variable J_PREFS(autoposition) is true, the panel will be (approximately) centred on the screen by the j:dialogue procedure (in jtkutils.tcl).
Note
The value of title is not automatically localised; you should convert it to its localised form using the procedures in jldb.tcl (the jldb package) before calling ::jstools::print.
::jstools::print_ps
Usage
	::jstools::print [options]
Options
	-title title  (default Print PostScript)
	-data text  (default {} - not really optional)
Example
	::jstools::print_ps -data [.canvas postscript]
Description
This prodedure is identical to ::jstools::print_ps except that (1) its title and prompt mention that the data to be printed is PostScript, and (2) it throws an error if data does not start with `%!', since that will confuse many PostScript interpreters
Future Directions
· A future version of this library will provide a user interface to the printing preferences directly on the confirmation panel.
} {{{list:level:1 {47.0 48.0}} {jhtml:anchor:anchorname {20.0 21.0 36.0 37.0}} {jdoc:anchor:anchorname {2.0 3.0 9.0 10.0 16.0 17.0 20.16 21.0 36.19 37.0}} {jdoc:xref:link {3.53 3.60 3.238 3.274 8.211 8.232 8.240 8.258 8.262 8.283 18.0 18.16 19.0 19.19 29.144 29.180 33.117 33.127 33.142 33.154 35.119 35.127}} {richtext:font:roman {3.0 3.4 3.14 3.53 3.60 3.242 3.249 5.24 5.34 6.0 6.5 7.0 7.21 8.20 8.30 8.103 8.112 8.127 8.134 8.215 8.222 8.244 8.249 8.262 8.283 9.0 11.0 12.0 12.9 13.0 13.22 14.0 15.0 16.0 18.16 19.0 19.19 20.0 22.18 22.19 22.26 23.0 24.16 24.24 24.29 25.0 25.14 25.22 25.24 26.0 29.0 29.72 29.76 29.148 29.155 29.244 29.248 31.3 31.8 33.23 33.44 33.117 33.127 33.142 33.154 34.0 35.0 35.13 35.18 35.119 35.127 35.133 35.137 35.162 35.178 36.0 38.18 38.19 38.26 39.0 40.16 40.24 40.40 41.0 41.14 41.22 41.24 42.0 45.0 45.31 45.50 45.169 45.173 45.195 45.197 46.0 47.0 48.0}} {richtext:font:italic {22.19 22.26 24.8 24.13 25.7 25.11 31.3 31.8 35.13 35.18 38.19 38.26 40.8 40.13 41.7 41.11}} {richtext:font:bold {3.4 3.14 3.53 3.60 3.242 3.249 5.24 5.34 8.20 8.30 8.215 8.222 29.148 29.155 33.142 33.154 35.119 35.127}} {richtext:font:bolditalic {8.244 8.249 8.262 8.283}} {richtext:font:typewriter {8.103 8.112 8.127 8.134 12.0 12.9 13.0 13.22 18.0 18.16 19.0 19.19 22.0 22.18 24.0 24.8 24.13 24.16 24.24 24.29 25.0 25.7 25.11 25.14 25.22 25.24 27.0 28.0 33.23 33.44 33.117 33.127 35.133 35.137 35.162 35.178 38.0 38.18 40.0 40.8 40.13 40.16 40.24 40.40 41.0 41.7 41.11 41.14 41.22 41.24 43.0 44.0 45.31 45.50 45.195 45.197}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {2.0 3.0 6.0 6.5 9.0 10.0 16.0 17.0 20.0 21.0 36.0 37.0 46.0 47.0}} {richtext:font:heading2 {7.0 7.21 10.0 11.0 14.0 15.0 17.0 18.0 21.0 22.0 23.0 24.0 26.0 27.0 28.0 29.0 34.0 35.0 37.0 38.0 39.0 40.0 42.0 43.0 44.0 45.0}} {richtext:font:l_cite {29.72 29.76 29.244 29.248 45.169 45.173}} {{} {8.284 16.0 17.0 18.0 19.38 22.12 22.17 24.24 24.29 25.22 25.24 26.0 32.0 33.72 33.109 33.137 33.155 38.12 38.17 40.24 40.41 41.22 41.24 42.0 45.252 46.0}} {jdoc:link:jstools.jdoc {3.53 3.60}} {jdoc:link:jslibraries.jdoc#Usage {8.240 8.258}} {jdoc:link:jslibraries.jdoc {8.211 8.232 8.262 8.283}} {jdoc:anchorname:Credits_and_Copyright {9.0 10.0}} {jdoc:anchorname:Introduction {2.0 3.0}} {jdoc:anchorname:Overview {16.0 17.0}} {jdoc:anchorname:j:alert {20.16 21.0 36.19 37.0}} {jdoc:link:jtkutils.tcl.jdoc {33.142 33.154}} {jdoc:link:jtkutils.tcl.jdoc#j:dialogue {33.117 33.127}} {list:1:ul {47.0 48.0}} {jhtml:anchorname:::jstools::alert {20.0 21.0 36.0 37.0}} {jdoc:link:jldb.tcl.html {35.119 35.127}} {jdoc:link:#::jstools::print_ps {19.0 19.19}} {jdoc:link:#::jstools::print {18.0 18.16}} {special:list_item:1 {47.0 47.1}} {jdoc:link:prefpanel.html {3.238 3.274 29.144 29.180}}} {{del_from 48.0} {abbrevstart 45.252} {matchstart 46.0} {anchor 29.145} {emacs_mark 48.0} {insert_save 47.31} {richptr 46.0} {insert 29.180} {del_to 48.0} {abbrevend 45.252} {current 9.6} {matchend 46.0}}} {{body_alink #ff0000} {body_vlink #000080} {body_link #0000ff} {body_text #000000} {body_bgcolor #ffffff}}