Path: usenet.cise.ufl.edu!newsfeeds.nerdc.ufl.edu!headwall.stanford.edu!newsfeed.stanford.edu!nntp1!nntp2.savvis.net!inetarena.com!not-for-mail
From:
[email protected] (Fabien Tassin)
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules
Subject: [ANNOUNCE] PDF::Create 0.01
Date: 14 Nov 1999 13:23:15 GMT
Organization: Oleane
Lines: 82
Approved:
[email protected] (comp.lang.perl.announce)
Message-ID: <
[email protected]>
NNTP-Posting-Host: halfdome.holdit.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cise.ufl.edu comp.lang.perl.announce:390 comp.lang.perl.modules:14633
I've just uploaded PDF::Create 0.01 to CPAN. It will be
available shortly there :
http://search.cpan.org/search?dist=PDF-Create
It *is* already available on my own ftp site :
ftp://ftp.oleane.net/private/fta/perl/cpan/PDF-Create-0.01.tar.gz
Please note that if you are looking for a WYSIWYG PDF creator/editor or
if you don't know what Perl is, this announce is not for you.
Follow a part of the README :
NAME
PDF::Create - create PDF files
DESCRIPTION
PDF::Create allows you to create PDF documents using a large
number of primitives, and emit the result as a PDF file or
stream. PDF stands for Portable Document Format.
Documents can have several pages, a table of content, an
information section and many other PDF elements. More
functionnalities will be added as needs arise.
Documents are constructed on the fly so the memory footprint is
not tied to the size of the pages but only to their number.
SYNOPSIS
use PDF::Create;
my $pdf = new PDF::Create('filename' => 'mypdf.pdf',
'Version' => 1.2,
'PageMode' => 'UseOutlines',
'Author' => 'Fabien Tassin',
'Title' => 'My title',
);
my $root = $pdf->new_page('MediaBox' => [ 0, 0, 612, 792 ]);
# Add a page which inherits its attributes from $root
my $page = $root->new_page;
# Prepare 2 fonts
my $f1 = $pdf->font('Subtype' => 'Type1',
'Encoding' => 'WinAnsiEncoding',
'BaseFont' => 'Helvetica');
my $f2 = $pdf->font('Subtype' => 'Type1',
'Encoding' => 'WinAnsiEncoding',
'BaseFont' => 'Helvetica-Bold');
# Prepare a Table of Content
my $toc = $pdf->new_outline('Title' => 'Document',
'Destination' => $page);
$toc->new_outline('Title' => 'Section 1');
my $s2 = $toc->new_outline('Title' => 'Section 2',
'Status' => 'closed');
$s2->new_outline('Title' => 'Subsection 1');
$page->stringc($f2, 40, 306, 426, "PDF::Create");
$page->stringc($f1, 20, 306, 396, "version $PDF::Create::VERSION");
# Add another page
my $page2 = $root->new_page;
$page2->line(0, 0, 612, 792);
$page2->line(0, 792, 612, 0);
$toc->new_outline('Title' => 'Section 3');
$pdf->new_outline('Title' => 'Summary');
# Add something to the first page
$page->stringc($f1, 20, 306, 300,
'by Fabien Tassin <
[email protected]>');
# Add the missing PDF objects and the footer then close the file
$pdf->close;
Share and enjoy.
--
Fabien Tassin -+-
[email protected]