Heffstar has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that if the user viewing a PDF tries to save or email it from Acrobat, it saves as "script.pl" but is actually the PDF. If the extension is changed, it'll open as a PDF.
I've tried a multitude of header variations, but nothing changes. I thought by providing the script, more light may be shed on it. Any suggestions?$| = 1; # turn off buffering of stdout open (FILE, "$path"); # Opens file immediately upon being clicked, but doesn't allow proper +saving of extensions when emailed from in Acrobat $page = $q->header(-type=>'application/pdf', -disposition=>'inline +') . $q->start_html(-title=>$news_id.".pdf", -style=>{-src=>'../style +.css' }) . $q->start_form(-name=>'main') . $q->end_form(); while (<FILE>) { print $_; } $page .= $q->end_html(); $| = 0; #turn on buffering of stdout print $page;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print PDF Problem
by tilly (Archbishop) on Jul 11, 2008 at 21:11 UTC | |
|
Re: Print PDF Problem
by thezip (Vicar) on Jul 11, 2008 at 21:11 UTC | |
|
Re: Print PDF Problem
by Heffstar (Acolyte) on Jul 11, 2008 at 21:53 UTC |