Outputting to PDF simply?

B

bobm3

Fellow mongers...

I've searched CPAN as well as googled for numerous pdf creator
utilities. I've read about some of the perl modules available (i.e.:
PDF::API, PDF::Report, PDF::ReportWriter, etc).

I think all these are overkill for what I am trying to do. Perhaps
some of you can recommend a workable solution that I can research and
hopefully incorporate.

I have some perl programs that create business reports using the
write(format) feature (which works very well, BTW) and they are now
creating text output. I would like to have those converted to or
output directly as PDF's so they can be more easily opened for
viewing, searching and printing with Acrobat.

Any recommendations as to what my fill this bill with the least amount
of changes?

Thanks all for your kind and knowledgeable advice!
 
A

A. Sinan Unur

(e-mail address removed) wrote in 4ax.com:
I have some perl programs that create business reports using the
write(format) feature (which works very well, BTW) and they are now
creating text output. I would like to have those converted to or
output directly as PDF's so they can be more easily opened for
viewing, searching and printing with Acrobat.

Run a2ps and ps2pdf on the output.

http://www.gnu.org/software/a2ps/

http://www.ghostscript.com/

Sinan

--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
 
C

ccc31807

I have some perl programs that create business reports using the
write(format) feature (which works very well, BTW) and they are now
creating text output.  I would like to have those converted to or
output directly as PDF's so they can be more easily opened for
viewing, searching  and printing with Acrobat.

'Simple' might be in the eye of the beholder. I use PDF::API2. One of
the scripts I use it is for the creation of about 5,000 contracts five
times a year, and it does exactly what you would expect -- create
about 5,000 PDF documents, along with a cover letter and instructions.

Yes, you do have to write each line, but that's no harder than hand
writing HTML or creating a format, and it variable interpolates so you
can write templates. I've included a sample below.

CC

-----------sample using PDF::API2--------------------
$text->fillcolor('black');
$text->font( $font{'Times'}{'Bold'}, 11/pt );

$text->translate( 72, 580 );
$text->text("Greetings, $fac_contract{FIRST} $fac_contract{MIDDLE}
$fac_contract{LAST},");

$text->fillcolor('black');
$text->font( $font{'Times'}{'Roman'}, 11/pt );

$text->translate( 72, 560);
$text->text("The following is information for reviewing and
completing your Term $fac_contract{TERM} adjunct contract. After");

$text->translate( 72, 550);
$text->text("you have reviewed your contract, print and sign as
Faculty Appointee. Mail it to the address listed");

$text->translate( 72, 540);
$text->text("below as soon as possible.");

$text->font( $font{'Helvetica'}{'Bold'}, 12/pt );
$text->fillcolor('darkred');

$text->translate( 72, 500);
$text->text("Need to change your address, phone number?");
 
B

bobmct

Thanks gents!

You've all given me good feedback to research and dabble with.

Much appreciated. B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top