Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: PDF via Perl?

by perlmonkey (Hermit)
on May 23, 2000 at 05:40 UTC ( #14310=note: print w/replies, xml ) Need Help??

in reply to PDF via Perl?

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 I stumbled on a message that refered to it. BTW it is not in 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

Replies are listed 'Best First'.
Re^2: PDF via Perl?
by yourself (Novice) on Oct 30, 2006 at 08:32 UTC
    How can I output the Simplified Chinese Code with Correct 'Encoding'? When I use 'gb2312' or 'utf-8', there has the wrong output. Thanks!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://14310]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2021-09-27 20:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found