in reply to Re: Vertical align with PDF::Table
in thread Vertical align with PDF::Table
I've tried reading pdf::table documentation.
But there's not any mention to vertical alignment
My example code is:
#!/usr/bin/perl use strict; use PDF::API2; use PDF::Table; my $pdftable = new PDF::Table; my $pdf = new PDF::API2(-file => "pdf_table.pdf"); my $page = $pdf->page(); $pdf->mediabox('A4'); my $col_props = [ { justify => 'right', font => $pdf->corefont("Helvetica", -encoding => "utf8"), + font_size => 12, min_w => 100, max_w => 100, }, { justify => 'left', min_w => 100, max_w => 100, } ]; my $data = [ ['title0', "content 0" ], ['title1', "first line\nsecond line\nthird line"], ['title2', "content 2"], ['title3', "content 3"], ['title4', "content 4"], ['title5', "content 5"], ['title6', "content 6"] ] ; # build the table layout my ($end_page, $pages_spanned, $table_bot_y) = $pdftable->table( $pdf, $page, $data, x => 40, w => 200, start_y => 500, next_y => 700, start_h => 300, next_h => 500, padding => 5, padding_right => 10, column_props => $col_props, ); $pdf->saveas();
The cell of second row and second column takes three lines. Than I want to align vertically centered the content of all other columns of that row. I could'nt find any indication in the documentaion. Thank's</>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Vertical align with PDF::Table
by ww (Archbishop) on Jan 28, 2013 at 12:37 UTC | |
by Another Ed (Sexton) on Feb 12, 2013 at 09:28 UTC |
In Section
Seekers of Perl Wisdom