grizzley has asked for the wisdom of the Perl Monks concerning the following question:
Here code of generatePDF.html% if($ddc_generatePDF) % { <& '/pdf_templates/generatePDF.html', data => $data, data2 => $data2, fileName => 'D:/project1/printouts/mypdf.pdf' &> <& '/pdf_templates/displayPDF.html', fileName => 'D:/project1/printouts/mypdf.pdf' &> % }
Here, code of displayPDF.html:<%args> data data2 fileName </%args> <%init> use constant mm => 25.4/72; use constant in => 1/72; use constant pt => 1; </%init> <%perl> PDF::Reuse::prFile($fileName); ...some other commands... PDF::Reuse::prEnd();
Any help appreciated. And virtual beer for one more hint: how to open print dialog programmatically after displaying PDF?<%args> $fileName </%args> <%init> use Apache2::SubRequest; my $subr = $r->lookup_file($fileName); return 404 unless -f $fileName and $subr->status == 200; $r->content_type($subr->content_type); # $r->send_http_header; return 200 if $r->header_only; $subr->run; $m->abort; </%init>
I am working on Win XP, but it will be installed on Linux.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Open generated PDF in new tab/new page in HTML::Mason
by pc88mxer (Vicar) on May 11, 2008 at 14:51 UTC | |
by grizzley (Chaplain) on May 11, 2008 at 16:56 UTC | |
by pc88mxer (Vicar) on May 12, 2008 at 06:08 UTC | |
|
Re: Open generated PDF in new tab/new page in HTML::Mason
by quester (Vicar) on May 11, 2008 at 21:32 UTC | |
|
Re: Open generated PDF in new tab/new page in HTML::Mason
by Gangabass (Vicar) on May 11, 2008 at 14:17 UTC | |
by grizzley (Chaplain) on May 11, 2008 at 16:24 UTC |