Thread PDF::Table Anzahl der Zeilen pro seite begrenzt? (13 answers)
Opened by Gast at 2008-02-18 15:32

Gast Gast
 2008-02-19 16:52
#106109 #106109
ok...danke für deine Hilfe! hier mein code:
Code (perl): (dl )
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();

View full thread PDF::Table Anzahl der Zeilen pro seite begrenzt?