I wanted WWW page to open generated PDF in separate Acrobat window, but didn't succeeded
It would be helpful if you described how it is not working. What do you get back, a blank page or a page full of garbage or does the server just hang?

The best you can do is to generate and return a PDF document with the proper HTTP headers. What the client does with the document (opens Acrobat or whatever) depends on how the client is configured. You won't be able to invoke commands on the client's machine with system.

Make the following checks:

  1. Use wget -S http://your/url to see if you are generating the right HTTP headers. You should be sending Content-Type: application/pdf.
  2. Also with wget make sure you are returning a valid PDF file.
  3. Finally, see how the client's browser is configured to handle PDF files. Acrobat should automatically take over handling PDF files when it is installed, but perhaps it got changed.

To open the print dialog, you could put your document in an <iframe> and specify an onload handler for it:

<html> <head> <script> function doit() { window.print(); } </script> </head> <body> <iframe src="your pdf url here" onload="doit()"></iframe> </body> </html>

In reply to Re: Open generated PDF in new tab/new page in HTML::Mason by pc88mxer
in thread Open generated PDF in new tab/new page in HTML::Mason by grizzley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.