Try the following to get an A4 landscape page:
my $pdf = PDF::API2->new( -file => 'table.pdf' ); $pdf->mediabox(842, 595);
For other paper sizes you can work out from the following table (taken from PDF::API2::Resource::PaperSizes):
'4a' => [ 4760, 6716 ], '2a' => [ 3368, 4760 ], 'a0' => [ 2380, 3368 ], 'a1' => [ 1684, 2380 ], 'a2' => [ 1190, 1684 ], 'a3' => [ 842, 1190 ], 'a4' => [ 595, 842 ], 'a5' => [ 421, 595 ], 'a6' => [ 297, 421 ], '4b' => [ 5656, 8000 ], '2b' => [ 4000, 5656 ], 'b0' => [ 2828, 4000 ], 'b1' => [ 2000, 2828 ], 'b2' => [ 1414, 2000 ], 'b3' => [ 1000, 1414 ], 'b4' => [ 707, 1000 ], 'b5' => [ 500, 707 ], 'b6' => [ 353, 500 ], 'letter' => [ 612, 792 ], 'broadsheet' => [ 1296, 1584 ], 'ledger' => [ 1224, 792 ], 'tabloid' => [ 792, 1224 ], 'legal' => [ 612, 1008 ], 'executive' => [ 522, 756 ], '36x36' => [ 2592, 2592 ],

In reply to Re: pdf::table landscape by tangent
in thread pdf::table landscape by dsx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.