Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Outputting to PDF simply?

Reply
Thread Tools

Outputting to PDF simply?

 
 
bobm3@worthless.info
Guest
Posts: n/a
 
      05-19-2009
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!
 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      05-19-2009
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:bng515l0ltk5ftcd0i4nrs386ofc6cpcjp@
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 <(E-Mail Removed)>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
 
Reply With Quote
 
 
 
 
ccc31807
Guest
Posts: n/a
 
      05-19-2009
On May 19, 10:34*am, (E-Mail Removed) wrote:
> 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?");
 
Reply With Quote
 
bobmct
Guest
Posts: n/a
 
      05-20-2009
Thanks gents!

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

Much appreciated. B
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postscript to PDF with pdf-tools, pdf-writer, or other Sean Nakasone Ruby 1 04-14-2008 09:13 PM
PDF::Writer, create pdf and insert in other pdf file. Ricardo Pog Ruby 1 03-26-2008 08:24 PM
outputting doc or pdf files from sql fredd00 ASP .Net 2 09-03-2005 01:09 PM
Outputting in-line image from BLOB in ASP.NET Jonathan ASP .Net 4 12-15-2004 10:34 PM
duplicated request for servlet outputting PDF kevin Java 8 06-07-2004 11:11 AM



Advertisments