Version 38 of Tcl/Tk Printing Support

Updated 2009-05-09 17:30:59 by dkf

This is one of the GSoC 2009 Projects.


KBlicharski This site is considered to be a wish list for the text widget printing support.

At this time I know that text widget is widely used to create reports or text editors, so options which I find useful are:

  1. pagination mechanism
  2. ability to add headers, footers to pages
  3. generated page breaks at user-definable locations
  4. ability to do preview before starting printing
  5. ZB Export of the text window's contents into formatted using HPCL-6 commands...
  6. ...Export text window's contents into ps file...
  7. ...like above, but into *.pdf

I'm open to any suggestions to what more should be added to this list.

Reference to 5: ZB I mean here the file prepared especially for HP-compatible printer, ready to be printed using single command; printing in such case will be much faster than processing *.ps file. LV Or maybe exporting the text in some (non-PostScript) text markup that could then be converted into various printer-specific formats? That would seem more flexible. ZB You can consider HPCL-6 as such "markup language", that can be further converted into any other, in case of need. The advantage would be, that one would have formatted file, ready for print-out on HPCL compatible printers without the need for any additional conversion.JSB I don't think you want to use PCL-6 as a standard (if any pcl) PCL-5 or less would be safer and have more coverage. ZB It's not about coverage; it's about possibility to transfer text window's contents with as few changes as possible. If PCL-5 will be enough - it's OK. But if not - never mind the "coverage", if PCL-6 will give better results

Reference to 6 & 7: Yes, there are some suggested solutions for the latter two at the wiki already, but all of them relying either on additional packages, or even on external utilities (like enscript and so on), and therefore aren't portable. Better would be - if possible - to have direct export possibility. Both file formats are important: "ps" because it can be further processed by other printing tools (like gs), and "pdf" because it's de facto standard in the documents exchange. JSB I think postscript would be the best bet overall and then the user can use other tools lie ghostscript to convert/print. Portable printing is tricky, hell printing to different printers on the same platform is bad enough sometimes. ZB Of course at least postcript would be very good - although having PDF and HPCL "natively" would be even better. And I think, when one export option will be done, the other ones will be easier to introduce, for the same person.

jdp - Actually, it would be nice to have printing support separate from the text widget - possibly some way of printing data directly, from a text widget, and from a canvas widget? That way it would be possible to add printing support to custom widgets, and possibly from tclsh as well.


My name is Krzysztof (Cris) Blicharski

Contact with me:

* via mail: [email protected]

* I also will be reachable via IRC (my nick will be blicharski)