Version 6 of Wouldn't It Be Nice If...

Updated 2008-01-10 09:32:06 by dkf

Often abbreviated WIBNI...


Tk had the built-in ability to generate PDF from the text widget?

It would more-or-less negate the need for a printing solution, as our apps could generate PDF and spawn an external program to print. Almost equally compelling would be to be able to take a text widget and convert it to valid HTML+CSS, but I like the idea of a single file PDF more.

escargo 09 Jan 2008 - While being able to generate PDF is useful, being "able to take a text widget and convert it to valid HTML+CSS," would greatly simplify the creation of web page (and potentially web site) editors.

EKB: There appears to be a nice start at Text2PDF. It only does the text, not the formatting, but it seems like a very good place to start.

Martyn Smith: This is exactly the approach I used in my editor [L1 ] using the pdf4tcl library, the code can be viewed/edited from within MSEdit by typing 'pedit PrintFile' and 'pedit PDFNewPage' in the internal tcl console (F12), I think the only changes I made to pdf4tcl were to add the A4R and A3R paper sizes. The printing prints either the whole file or the current selection to a file then starts up the default PDF viewer on windows or the chosen viewer on Linux.