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.
In reply to Open generated PDF in new tab/new page in HTML::Mason by grizzley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |