#!/usr/bin/perl
use warnings;
use LWP::Simple;
use HTML::TokeParser;
use PDF::API2;
use Text::Autoformat;
.
.
.
.
.
my $pdffile = '$file';
my $pdf = PDF::API2->new( -file => "$directoryname/$file.pdf");
my $page = $pdf->page;
$page->mediabox('A4');
my $times = $pdf->corefont( 'Times', -encoding => 'latin1');
my $main_text = $page->text;
$main_text->font($times, 14);
$main_text->fillcolor('pearl');
$main_text->lead(16);
$main_text->translate(15, 650);
$main_text->paragraph("@body\n", 575, 144, -align => "justify");
$pdf->save;
$pdf->end;
I use PDF:API2 alot. It is easy to create a new page, when you are
done adding to the existing page you just do a new $page = $pdf->$page
and start writing to the second page.
Bill H