NAME

Pcore::API::PDF - non-blocking HTML to PDF converter

SYNOPSIS

    use Pcore::API::PDF;

    my $pdf = Pcore::API::PDF->new({
        bin         => 'path-to-princexml-executable',
        max_threads => 4,
    });

    # $res->{data} contains ScalarRef to generated PDF content
    my $res = $pdf->generate_pdf($html);

DESCRIPTION

Generate PDF from HTML templates, using princexml.

ATTRIBUTES

bin

Path to princexml executable. Mandatory attribute.

max_threads

Maximum number of princexml processes. Default value is 4.

METHODS

generate_pdf( $self, $html )

Generates PDF from $html template. $result is a standard Pcore API result object, see Pcore::Util::Result documentation for details.

SEE ALSO

Pcore
Pcore::Util::Result
https://www.princexml.com/

AUTHOR

zdm <zdm@softvisio.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by zdm.