#!/usr/bin/env perl use 5.012; use warnings; use PDF::API2; use PDF::Table; my $pdftable = new PDF::Table; my $pdf = new PDF::API2(-file => 'test.pdf'); my $page = $pdf->page; # Table data, two columns my $scalar_song = [ [ '$ Sigils to the left of me', 'Arrows to the right ->' ], [ '$self->here', 'Stuck in the \[] with you' ] ]; my $col_props = [ { font => $pdf->corefont("Courier-Bold"), width => 250, font_color => 'blue', },{ font => $pdf->corefont("Courier-Bold"), width => 250, justify => 'right', font_color => 'green', } ]; $pdftable->table($pdf, $page, $scalar_song, -column_props => $col_props, -start_y => 750, -start_h => 300, -padding => 10, -x => 50, ); $pdf->saveas();