[Catalyst] Opening existing PDF with Catalyst::View::PDF::API2

Zoffix Znet cpan at zoffix.com
Sun Oct 12 13:02:21 GMT 2014

I haven't used it, but looking at the last paragraph of the docs for
``process`` https://metacpan.org/pod/Catalyst::View::PDF::API2#process I
notice they say to use $c->stash->{pdf_filename} = 'myfile.pdf'; to set
the PDF filename. They also mention what filename is assumed by default.

->open is a class method of PDF::API2, and I think you only get object
methods with the object provided by Catalyst::View::PDF::API2

The error itself happens when you use a reference as a class. Run this
to get the full message from diagnostics: perl -Mdiagnostics -e 'bless
{}, {};'
Hope this helps!

On Sun, 2014-10-12 at 11:56 +0000, Adam Witney wrote:
> Hi,
> I am trying to use Catalyst::View::PDF::API2 to open an existing PDF, modify it and then send it to the user. Looking at the documentation, it says that you can reuse existing PDF's but it doesn't show how to do it. I have tried this in the template
> [% page = pdf.open('my.pdf') %]
> But this gives the error:
> undef error - Attempt to bless into a reference at /opt/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/PDF/API2.pm line 188.
> Has anyone managed to get this to work? Or does anyone know what this error means?
> Thanks for any help
> Adam
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

More information about the Catalyst mailing list