Rotateing a table?

"faeleanan" <[email protected]> Wed, 14 Jan 2009 22:34:40 -0000
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
I'm trying to print a table in landscape mode.

I did the following to do so:

  my $pdftable = new PDF::Table;
  open my $pdf_handle, ">", \my $pdf_data or die $!;
  my $pdf = new PDF::API2(-file => $pdf_handle);
  my $page = $pdf->page();
  $page->rotate(90);
  $pdf->mediabox('A3');
  #generate the pdf

What I am seeing is that the table is getting printed in portrait mode
and then the whole page is being rotated.  I want to rotate the page
THEN print the table.  Ideas?