[Lexington-pm] Printing from perl?

David Hempy hempy at ket.org
Wed Nov 24 20:19:36 CST 2004


I'm a bit embarassed that I don't know how to do this, and a bit surprised this is the first time I've needed to.

I need to print a shipping label from a perl program on a Windows box. 

That's it.  Nothing more.  Seems simple enough?



I could deal with just plain monosapce text, but I'd much rather have a modest amount of control, such as font size, layout, borders, etc.  HTML layout would fit the bill perfectly, but I'm not tied to it.  I suspect Latex might solve my problems, but I really don't know anything about it.

I've been unable to find a way to print an HTML file from an unattended perl script.  I've found several ways to tell Explorer to print, but all involve a printer dialogue box, requiring a mouseclick.  (One document said this is a security feature to keep the spammers out of your printer.)  Scripting a click to fix that seems like a low-reliability solution. 

I found a third-party printing solution ( 	http://www.traction-software.co.uk/batchprint/ ) that will print an html (or many other formats) file from a command line interface, or by watching a dropbox folder.  At the moment, this is my most promising prospect...but I just feel that is an unneeded layer of complication for what should be a simple task.  You would think you could just run "explorer --print myfile.html" ...but no dice.


So...we've got a number of professional perl programmers on the list...how do you handle report printing from perl programs?


Help me put the "r" back in "perl!"
-dave


-- 
David Hempy 
Internet Database Administrator
Kentucky Educational Television 
(859)258-7164  -  (800)333-9764

A firm grip on reality is not a critical component of happiness.




More information about the Lexington-pm mailing list