dsx has asked for the wisdom of the Perl Monks concerning the following question:
hi, i want to create a table with PDF :: Table. because the table has many columns, i need landscape mode. how can i do that? i have already try the following code. but if i make it this way, the table is rotated too.
#!/usr/bin/perl -w use strict; use PDF::API2; use PDF::Table; my $pdf = PDF::API2->new( -file => 'table.pdf' ); my $table = PDF::Table->new; my $page = $pdf->page; $page->rotate(90); my $hdr_props = { font => $pdf->corefont("Helvetica", -encoding => + "utf8"), font_size => 14, font_color => '#000000', bg_color => 'grey', repeat => 0, }; $table->table( $pdf, $page, $data, x => 50, w => 495, start_y => 750, next_y => 700, start_h => 300, next_h => 500, padding => 3, header_props => $hdr_props, ); $pdf->save;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pdf::table landscape
by tangent (Parson) on Apr 01, 2012 at 20:36 UTC | |
by dsx (Novice) on Apr 01, 2012 at 21:08 UTC |