Leser: 1
|< 1 2 >| | 14 Einträge, 2 Seiten |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
use PDF::API2; use PDF::Table; my $pdftable = new PDF::Table; my $pdf = new PDF::API2(-file => "my_table.pdf"); my $page = $pdf->page; $page->mediabox(0,0,840,595); my $data = [ ["zeile1"], ["zeile2"], ["zeile3"], ["zeile4"], ["zeile5"], ["zeile6"], ["zeile7"], ["zeile8"], ["zeile9"], ]; $pdftable->table( $pdf, $page, $data, -x => 50, -start_y => 450, -next_y => 450, -start_h => 100, -next_h => 100, -max_word_length=> 20, -w => 690, -padding => 5, -padding_right => 10, -font=> $pdf->corefont("Helvetica Bold", -encoding => "utf8",), -font_size => 8, ); $pdf->save();
1 2 3 4 5 6 7 8 9 10 11 12
$cell_props = [ [], [ {#Row 2 cell 1 background_color => '#AAAA00', font_color => 'blue', }, ], ];
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
use PDF::API2; use PDF::Table; my $pdftable = new PDF::Table; my $pdf = new PDF::API2(-file => "table.pdf"); my $pdftable1 = new PDF::Table; my $page = $pdf->page; $col_props1 = [ { min_w => 36, justify => 'left', }, { min_w => 36, justify => 'left', background_color => '#FFFF00', }, { min_w => 36, justify => 'left', }, { min_w => 41, justify => 'left', }, ]; my $some_data = [ ["test1","3","3","3","3","3","3"], ["test2","3","3","3","3","3","3"], ["test3","3","3","3","3","3","3"], ["test4","3","3","3","3","3","3"], ["test5","3","3","3","3","3","3"], ]; $pdftable1->table( # required params $pdf, $page, $some_data, -x => 50, -start_y => 215, -next_y => 0, -start_h => 400, -next_h => 0, # some optional params -w => 85, -padding => 5, -padding_right => 1, -padding_left => 5, -font=> $pdf->corefont("Helvetica Bold", -encoding => "utf8",), -font_size => 4, -column_props => $col_props1, #-cell_props => $row_props #cell background color for even rows ); $pdf->save();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#!/usr/bin/perl use strict; use warnings; use PDF::API2; use PDF::Table; my $pdf = new PDF::API2( -file => "table.pdf" ); my $pdftable1 = new PDF::Table; my $page = $pdf->page; my $col_props1 = [ { min_w => 36, justify => 'left', }, { min_w => 36, justify => 'left', background_color => '#FFFF00', }, { min_w => 36, justify => 'left', }, { min_w => 41, justify => 'left', }, ]; my $some_data = [ [ "test1", "3", "3", "3", "3", "3", "3" ], [ "test2", "3", "3", "3", "3", "3", "3" ], [ "test3", "3", "3", "3", "3", "3", "3" ], [ "test4", "3", "3", "3", "3", "3", "3" ], [ "test5", "3", "3", "3", "3", "3", "3" ], ]; $pdftable1->table( # required params $pdf, $page, $some_data, x => 50, start_y => 215, next_y => 0, start_h => 400, next_h => 0, # some optional params w => 85, padding => 5, padding_right => 1, padding_left => 5, font => $pdf->corefont("Helvetica Bold"), font_size => 4, column_props => $col_props1, #-cell_props => $row_props #cell background color for even rows ); $pdf->save();
|< 1 2 >| | 14 Einträge, 2 Seiten |