PDF::EasyPDF allows PDF creation from a one-file module, with postscript-like controls.
SYNOPSIS
use PDF::EasyPDF;
my $pdf = PDF::EasyPDF->new({file=>"mypdffile.pdf",x=>mm(297),y=>mm(210)});
$pdf->setStrokeColor("CC0000");
$pdf->setStrokeWidth(8);
$pdf->rectangle(mm(10),mm(10),mm(297-20),mm(210-20));
$pdf->setFillColor("FFCC00");
$pdf->filledRectangle(mm(20),mm(20),mm(297-40),mm(210-40));
$pdf->setFillColor("CC0000");
$pdf->setFontFamily("Helvetica-Bold");
$pdf->setFontSize(24);
$pdf->text(mm(105),mm(210-22.5),"PDF::EasyPDF Demo");
$pdf->lines(mm(85),mm(35),mm(90),mm(105),mm(95),mm(35),mm(100),mm(105),mm(105),mm(35),mm(110),mm(105));
$pdf->setStrokeColor("000099");
$pdf->curve(300,300,300,400,400,400,400,300);
$pdf->setStrokeColor("0066FF");
$pdf->setFillColor("00FFFF");
$pdf->polygon(100,100,250,200,250,400,200,500);
$pdf->filledPolygon(100,100,250,200,250,400,200,500);
$pdf->close;
This module started life as a workaround, on discovering that PDF::API2 and friends are extremely tricky to compile using Activestate's PerlApp utility because of the large number of runtime modules and resource files they use. The module consists of a single .pm file. It produces small PDF files, partly because it only uses the 14 standard PDF fonts. Page content is implemented using a single stream object, and the controls are vaguely postscript-like.
Product's homepage
Requirements:
· Perl