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

Have you tried the new_page_func => $code_ref option to $pdftable->table()?  Its description sounds like it might do what you want:

If used the parameter 'new_page_func' must be a function reference which when executed will create a new page and will return the object back to the module. For example you can use it to put Page Title, Page Frame, Page Numbers and other staff that you need. Also if you need some different type of paper size and orientation than the default A4-Portrait for example B2-Landscape you can use this function ref to set it up for you.

Replies are listed 'Best First'.
Re^2: Rotating a (PDF:::Table) Page Help!
by Anonymous Monk on Mar 31, 2009 at 19:10 UTC
    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.
      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.