The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MooseX::PDF - Create PDF files with Moose using Template Toolkit templates

DESCRIPTION

MooseX::PDF provides functionality to create PDF files using Template Toolkit templates. Given a template with PDF::Reuse directives, this module will process the template and return the raw PDF contents.

This scalar can then be written to file, or output via a streamed process, such as a web server.

SYNOPSIS

In your moose file do something like:

with 'MooseX::PDF';

$self->inc_path('/path/to/my/templates/folder/');
my $vars = {
  scalar => $test,
  array  => \@array,
  hash   => \%hash
};

my $raw_pdf = $self->create_pdf('template_file',$vars);

ATTRIBUTES

$self->inc_path()

Used to set the INCLUDE_PATH for TT

SUBROUTINES/METHODS

create_pdf

Used to generate the raw pdf

AUTHOR

Hamid Afshar, <hamster at cpan.org>

BUGS

Please report any bugs or feature requests to bug-moosex-pdf-reuse at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-PDF. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

LICENSE AND COPYRIGHT

Copyright 2013-2014 Hamid Afshar.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0