The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::View::PDFBoxer - Runs view output through PDF::Boxer and sets response content-type if not already set.

VERSION

version 0.001

SYNOPSIS

    package MyApp::View::PDFBoxer;

    use Moose;
    use namespace::clean -except => 'meta';

    extends qw/Catalyst::View::TT/;
    with qw/Catalyst::View::PDFBoxer/;

    1;

DESCRIPTION

This is a Role which takes the current $c->response->body, runs it through PDF::Boxer as it's "spec" file to get a PDF::API2 object. $c->response->body is then set to the stringified PDF and content-type is set accordingly.

METHOD MODIFIERS

before process

Sets content-type to 'application/pdf; charset=utf-8' if not already set.

after process

Takes the current $c->response->body, runs it through PDF::Boxer as it's "spec" file to get a PDF::API2 object. $c->response->body is then set to the stringified PDF.

SEE ALSO

AUTHOR

Jason Galea <lecstor@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Jason Galea.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.