russellf has asked for the wisdom of the Perl Monks concerning the following question:

I am modifying a program that runs under plank, moose and friends. It currently uses PDF::API2::Simple but since the data is actually tabular I want to use PDF::Table to format the data.

My first attempt complained about not being able to find "corefont" via PDF::API2::Simple and I worked around that by defining the font before calling table and passing it as a parameter.

Now I get a similar message for "page" ??

 { "error" : "Can't locate object method \"page\" via package \"PDF::API2::Simple\" at /usr/local/share/perl5/PDF/Table.pm line 446.\n" }

I was able to replicate the issue with corefont in a short script with a tiny set of data passed into table.

PDF-Table-0.9.6_h3, 
PDF-API2-2.020, 
This is perl, v5.10.1
Red Hat Enterprise Linux Server release 6.4

Replies are listed 'Best First'.
Re: Getting "Can't locate object method" in PDF::Table::table
by kcott (Archbishop) on Jan 15, 2014 at 09:07 UTC

    G'day russellf,

    Welcome to the monastery.

    As you haven't provided any code, it's not possible to advise where the problem might be. Please read the guidelines in "How do I post a question effectively?" to find out how you can help us to help you.

    I do note that page and corefont are PDF::API2 methods (not PDF::API2::Simple methods). PDF::API2::Simple is described as a "Simplistic wrapper for the excellent PDF::API2 modules": your problem may simply be how you're attempting to invoke those methods. You might also consider using PDF::API2 directly and bypassing any wrapper issues.

    -- Ken

A reply falls below the community's threshold of quality. You may see it by logging in.