in reply to Re: Rotating a (PDF:::Table) Page Help!
in thread Rotating a (PDF:::Table) Page Help!

Any where where I can look on how to use this 'new_page_func', the doc is not specific on that, I tried
new_page_func  => "B2-Landscape", and
new_page_func  => "B2",, it did not work still.

Replies are listed 'Best First'.
Re^3: Rotating a (PDF:::Table) Page Help!
by Corion (Patriarch) on Mar 31, 2009 at 19:16 UTC
    the parameter 'new_page_func' must be a function reference

    This means, you need to pass it either the name of a subroutine, or an anonymous subroutine

    which when executed will create a new page

    ... so said subroutine must create a new page. Maybe something like the following, but bear in mind that I have no idea of how to use PDF::Table:

    new_page_func => sub { my ($pdf) = @_; # I don't know whether that's the parameter pa +ssed to this warn "Creating new page"; my $page = $pdf->page; # see PDF::API2 for pages ... do funky stuff with $page .... $page },
      The docs have this, its similar on how this value should be passed to $pdftable->table, look at this:
      my $hdr_props = { # This param could be a pdf core font or user specified TTF. # See PDF::API2 FONT METHODS for more information font => $pdf->corefont("Times", -encoding => "utf8"), font_size => 10, font_color => '#006666', bg_color => 'yellow', repeat => 1, # 1/0 eq On/Off if the header row should +be repeated to every new page };

      But the problem is what to use in here if I create something like
      my $code_ref = { ? => ? };

      I thing that on ? above should the right parameters to be passed to "pdftable->table". And I don't know what they are or how to use this "B2-Landscape function" in order to get what I need.

        That's not how code references work.