According to the docs, the image_png call takes either a filename or a filehandle. Path::Class::File isn't either, but if you call the ->open() method on the object, it should work.
On Thu Feb 09 05:41:32 2017, christoph.halbartschlager@atikon.com wrote:
Show quoted text> Hi
>
> When calling image_png an exception is thrown if passed parameter is
> an object
> of type Path::Class::File.
>
> Exception:
>
> "Not a GLOB reference at
> /usr/lib/perl5/vendor_perl/5.18.2/PDF/API2/Resource/XObject/Image/PNG.pm
> line
> 35."
>
> Cheers
> Christoph