Catalyst::View::Wkhtmltopdf

Catalyst view to convert HTML (or TT) content to PDF using wkhtmltopdf
Download

Catalyst::View::Wkhtmltopdf Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michele Beltrame
  • Publisher web site:
  • http://search.cpan.org/~arthas/

Catalyst::View::Wkhtmltopdf Tags


Catalyst::View::Wkhtmltopdf Description

Catalyst::View::Wkhtmltopdf is a Catalyst view handler that converts HTML data to PDF using wkhtmltopdf (which must be installed on your system). It can also handle direct conversion of TT templates (via Catalyst::View::TT).SYNOPSIS # lib/MyApp/View/Wkhtmltopdf.pm package MyApp::View::Wkhtmltopdf; use Moose; extends qw/Catalyst::View::Wkhtmltopdf/; __PACKAGE__->meta->make_immutable(); 1; # configure in lib/MyApp.pm MyApp->config({ ... 'View::Wkhtmltopdf' => { command => '/usr/local/bin/wkhtmltopdf', # Guessed via File::Spec by default tmpdir => '/usr/tmp', # Name of the Template view, "TT" by default tt_view => 'Template', }, }); sub ciao : Local { my($self, $c) = @_; # Pass some HTML... $c->stash->{wk} = { html => $web_page, }; # ..or a TT template $c->stash->{wk} = { template => 'hello.tt', page_size => 'a5', }; # More parameters... $c->stash->{wk} = { html => $web_page, disposition => 'attachment', filename => 'mydocument.pdf', }; $c->forward('View::Wkhtmltopdf'); }Product's homepage


Catalyst::View::Wkhtmltopdf Related Software