Once again, thanks for all the input.
Unfortunatley I found the PDF package and the
Text::PDF package
fairly useless. They seem to be strong in reading a pdf
file, but very weak or useless for actually creating a pdf file.
I also did look into the ps2pdf which is not a bad solution
if you want to install ghostscript.
The "PDF file creator written in perl" seemed promising
but it is licensed ... how lame. Also the txt2pdf is licensed
so screw them. I was getting really depressed as it seems
that everyone that touched pdf files was out to make
a crapload of money (adobe of course being the worst offender).
Anyway to wrap up my tale ... PDF::Create (duh!)
It is not part of the PDF package apparently (different authors),
but after another
extensive search (eventually from freshmeat.net) I stumbled on
a message that refered to it. BTW it is
not in search.cpan.org.
So I tried:
perl -MCPAN -e "install 'PDF::Create'"
and wah-lah! It worked, (and beautifully). Although it is
simple, and not fully implemented yet it works beyond my needs.
Here is a full program the creates a PDF file:
use PDF::Create;
use strict;
my $pdf = new PDF::Create('filename' => 'test.pdf',
'Version' => 1.2,
'Author' => 'Perl Monger',
'Title' => 'Test Test');
my $page = $pdf->new_page;
my $f1 = $pdf->font('Subtype' => 'Type1',
'Encoding' => 'WinAnsiEncoding',
'BaseFont' => 'Helvetica-Oblique');
$page->string($f1, 40, 30, 600, "Hello from pdf Hell!" );
$pdf->close;
I hope others find this helpful.
Update: PDF::Create Version 0.01 is now in
search.cpan.org
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.