Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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 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


Comment on Re: PDF via Perl?
Select or Download Code
Re^2: PDF via Perl?
by yourself (Initiate) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-10-22 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (114 votes), past polls