Outputting to PDF simply?

Discussion in 'Perl Misc' started by bobm3@worthless.info, May 19, 2009.

  1. Guest

    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!
    , May 19, 2009
    #1
    1. Advertising

  2. 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 <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
    A. Sinan Unur, May 19, 2009
    #2
    1. Advertising

  3. ccc31807 Guest

    On May 19, 10:34 am, 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?");
    ccc31807, May 19, 2009
    #3
  4. bobmct Guest

    Thanks gents!

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

    Much appreciated. B
    bobmct, May 20, 2009
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. frank
    Replies:
    0
    Views:
    335
    frank
    Jul 11, 2003
  2. fredd00

    outputting doc or pdf files from sql

    fredd00, Sep 3, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    402
    Mark Rae
    Sep 3, 2005
  3. kevin
    Replies:
    8
    Views:
    670
    Andrew Thompson
    Jun 7, 2004
  4. Ricardo Pog
    Replies:
    1
    Views:
    422
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    366
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page