summaryrefslogtreecommitdiffstats
path: root/library/print.tcl
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2023-09-28 19:47:31 (GMT)
committerKevin Walzer <kw@codebykevin.com>2023-09-28 19:47:31 (GMT)
commit6bb5d7f2d1bbe5252388a2431878ddb6bfa912a9 (patch)
tree7d77a669e06ba7dccdb74f94c6e2425246396e94 /library/print.tcl
parent85685654a158b50bfebbc55ddfe7f1c0a215cddf (diff)
downloadtk-6bb5d7f2d1bbe5252388a2431878ddb6bfa912a9.zip
tk-6bb5d7f2d1bbe5252388a2431878ddb6bfa912a9.tar.gz
tk-6bb5d7f2d1bbe5252388a2431878ddb6bfa912a9.tar.bz2
Additional tweaking to file export with printing
Diffstat (limited to 'library/print.tcl')
-rw-r--r--library/print.tcl7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/print.tcl b/library/print.tcl
index 0db7a0d..0879d72 100644
--- a/library/print.tcl
+++ b/library/print.tcl
@@ -31,8 +31,13 @@ namespace eval ::tk::print {
puts -nonewline $f $contents
} finally {
close $f
+ if {[file extension $filename] == ".ps"} {
+ #don't apply formatting to PostScript
+ file rename -force $dumpfile $tmpfile
+ } else {
#Make text fixed width for improved printed output
- exec fmt -w 75 $dumpfile > $tmpfile
+ exec fmt -w 75 $dumpfile > $tmpfile
+ }
return $tmpfile
}
}