nwright has asked for the wisdom of the Perl Monks concerning the following question:

Is there a command I can use in Perl to print graphical files (such as graphs and charts) directly to a printer on an input command through a Red-Hat Linux run program? Thanks

2004-11-12 Edited by Arunbear: Changed title from 'Printing', as per Monastery guidelines

Replies are listed 'Best First'.
Re: Graphics: printing graphical files
by PreferredUserName (Pilgrim) on Nov 12, 2004 at 18:34 UTC
    It depends on what format the graphical files are in. The "convert" program can turn most common graphics formats into something printable, and the "lpr" program will send them to the printer.
    convert my-chart.gif my-chart.ps lpr my-chart.ps
    You can do that in one step from perl like so:
    system("convert my-chart.gif ps:- | lpr") == 0 or die $!;
    If the charts are in an Excel spreadsheet or something, then that's doable, too, but a different question.
Re: Graphics: printing graphical files
by InfiniteLoop (Hermit) on Nov 12, 2004 at 16:04 UTC
    See the GD:: packages