I got sick of playing with wxPython's printing architecture. Tonight I lost the nerve and rewrite gnumed-mini's script printing using plain postscript / python templating
It appears to work well and very fast, printout virtually immediately with no hassles (as long as ghostscript installed or postscript printer It still has many warts like hardcoded fonts, no automatic line/wordwrap, and no intelligence (does not distinguish betwen private/subsidized script etc) but if this concept finds general liking, I will continue working on it. It has no dependencies other than python built-ins for now - gnumed has to pass all parameters via a single dictionary No error handling whatsoever, be warned. I checked it into /gnumed/gnumed/test-area/hherb/gmPSPrinter.py and /gnumed/gnumed/test-area/hherb/gmAUScriptPrinter.py It has no docuemntation whatsoever, but just doing "python /gnumed/gnumed/test-area/hherb/gmAUScriptPrinter.py" should print a script with three script items on a standard Australian PBS script form,. everything in the right place, unless your printer has different x/y offsets (which I haven't implemented yet). This should serve as an example good enough to get started. I tried tonight with various HP inkjets and they all place the text exactly where they should. Horst _______________________________________________ Gnumed-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnumed-devel
