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

I am using perl cgi as the interface to a sql database. From this interface I am wanting to produce quotes that are previewed using HTML output. These quotes will also include images. What would be an appropriate method for achieving this goal? I am wanting to add a button on the preview that will print my desired data using TCP on a win32 platform. Any suggestions or advise would be great. Thanks

Replies are listed 'Best First'.
Re: Printing with Perl
by BUU (Prior) on Aug 10, 2004 at 02:20 UTC
    If you are just producing html, let whatever browser is rendering it worry about printing.
      Thankyou for your response. I want to control the content that is printed. If i use a browser to print then it will contain URL and other irrelative information. Will i be best suited using a module to interact with a word processing program (eg msword). Thanks again..
        See my reply, I suggest creating one of those formats on the fly and returning it to the user so he may use the appropiate viewer to print.
Re: Printing with Perl
by nacredata (Sexton) on Aug 10, 2004 at 16:04 UTC
    I have a releated question which, like this one, is really only tangentially a perl question: I have several perl and mod_perl driven online MySQL databases. People want to print mailing labels, which requires fairly percise formated output. So far I've just been dumping data to tab delemited sets so people can import and print labels locally. Is there a good reliable module/routine/method for creating reliably accurate and percise formatted output, something like creating an RTF document on the fly?? -- d
      For the most "precision", this is probably the order you should use: IMAGE, PDF, [DOC | RTC | SXW]
        create an image or PDF-based sheet of text from perl/MySQL? How?
Re: Printing with Perl
by amt (Monk) on Aug 10, 2004 at 15:30 UTC
    Most implementations of sql databases, MySQL in my experience, are poorly suited for storing images. Since you will be serving these images through CGI, I would suggest storing the URI of image in the so that you can use that string as a key value.
    amt