Hi,
i want to create PDF Files from my UNIX text Files (the file ist mutch longer then one Page).
How can i create a new Page in the PDF Document with pdf::api2
The script will start with "pdf.pl textfile.txt"
Thx
mikri
i want to create PDF Files from my UNIX text Files (the file ist mutch longer then one Page).
How can i create a new Page in the PDF Document with pdf::api2
Code:
#!/usr/bin/perl
use PDF::API2;
my $pdf = PDF::API2->new();
my $fnt = $pdf->corefont('Helvetica');
my $page = $pdf->page;
$page->mediabox('A4');
my $gfx = $page->gfx;
open (IN, "$ARGV[0]");
my $line = 810;
while (<IN>) {
$gfx->textlabel(20,$line,$fnt,12,$_);
$line = $line - 15;
}
$pdf->saveas('document.pdf');
$pdf->end;
The script will start with "pdf.pl textfile.txt"
Thx
mikri