editing pdf files with perl

Discussion in 'Perl Misc' started by aditya2507@gmail.com, Feb 14, 2005.

  1. Guest

    Hi,

    I have a collection of PDF files which are stored in a directory. These
    PDF files follow a particular format. Each one of these files has some
    fields in the first page which are left blank. I need to fill those
    fields based on the input given by the user(s).
    I CANNOT overwrite these PDF files since the data contained in them is
    not elsewhere. I simply need to be able to edit and update the first
    page of these PDF files.

    Is there any way I can do this with Perl?

    Thanks in advance :)

    Aditya
     
    , Feb 14, 2005
    #1
    1. Advertising

  2. pikus Guest

    Re: editing pdf files with perl

    Bill Segraves wrote:
    > <> wrote in message
    > news:...
    > >
    > > Hi,
    > >
    > > I have a collection of PDF files which are stored in a directory.

    These
    > > PDF files follow a particular format. Each one of these files has

    some
    > > fields in the first page which are left blank. I need to fill those
    > > fields based on the input given by the user(s).
    > > I CANNOT overwrite these PDF files since the data contained in them

    is
    > > not elsewhere. I simply need to be able to edit and update the

    first
    > > page of these PDF files.
    > >
    > > Is there any way I can do this with Perl?

    >
    > Yes.
    >
    > OTOH, your question is not a Perl question that is appropriate for

    this
    > newsgroup.
    >
    > Please try posting the same question on the newsgroup comp.text.pdf,

    where
    > you'll likely get a few ideas, among which would be my response to

    your
    > posting there.
    >
    > Good luck.
    > --
    > Bill Segraves



    So why does this not qualify as an appropriate question for this group?
    It certainly looks like a miscellaneous perl question to me... Plus I
    want to know the answer but I'm lazy enough not to go to comp.text.pdf
    to get it. :) Thanks. - pikus
     
    pikus, Feb 15, 2005
    #2
    1. Advertising

  3. Guest

    Re: editing pdf files with perl

    Bill Segraves wrote:
    > <> wrote in message
    > news:...
    > >
    > > Hi,
    > >
    > > I have a collection of PDF files which are stored in a directory.

    These
    > > PDF files follow a particular format. Each one of these files has

    some
    > > fields in the first page which are left blank. I need to fill those
    > > fields based on the input given by the user(s).
    > > I CANNOT overwrite these PDF files since the data contained in them

    is
    > > not elsewhere. I simply need to be able to edit and update the

    first
    > > page of these PDF files.
    > >
    > > Is there any way I can do this with Perl?

    >
    > Yes.
    >


    > OTOH, your question is not a Perl question that is appropriate for

    this
    > newsgroup.

    I am not sure? :( I need to know how to do this in Perl, not any other
    language.

    > Please try posting the same question on the newsgroup comp.text.pdf,

    where
    > you'll likely get a few ideas, among which would be my response to

    your
    > posting there.

    But if you suggest, I will do so.


    > Good luck.
    > --
    > Bill Segraves



    Thanks Bill.
     
    , Feb 15, 2005
    #3
  4. Lambik Guest

    wrote:

    >
    > Hi,
    >
    > I have a collection of PDF files which are stored in a directory. These
    > PDF files follow a particular format. Each one of these files has some
    > fields in the first page which are left blank. I need to fill those
    > fields based on the input given by the user(s).
    > I CANNOT overwrite these PDF files since the data contained in them is
    > not elsewhere. I simply need to be able to edit and update the first
    > page of these PDF files.
    >
    > Is there any way I can do this with Perl?
    >
    > Thanks in advance :)
    >
    > Aditya



    PDF::Reuse???

    #Make a new temp-file
    prFile('$date.pdf');

    #import the templet
    prDoc ( { file => $documentName,
    first => $firstPage,
    last => $lastPage } );


    #assign a value to an interactive field
    prField ( $fieldName, $value )
     
    Lambik, Feb 15, 2005
    #4
  5. Bart Lateur Guest

    wrote:

    >I have a collection of PDF files which are stored in a directory. These
    >PDF files follow a particular format. Each one of these files has some
    >fields in the first page which are left blank. I need to fill those
    >fields based on the input given by the user(s).
    >I CANNOT overwrite these PDF files since the data contained in them is
    >not elsewhere. I simply need to be able to edit and update the first
    >page of these PDF files.
    >
    >Is there any way I can do this with Perl?
    >


    The module PDF::Reuse (see CPAN) is more or less made for situations
    like this. To avoid disappointments, I'll tell you what it does. It
    opens a PDF file, and you can *add* new stuff on top of the old stuff,
    draw on it. It *does not* search and replace some template text in your
    PDF file. For blank fields, this might just work.

    --
    Bart.
     
    Bart Lateur, Feb 18, 2005
    #5
  6. Guest

    Re: editing pdf files with perl

    Bart Lateur wrote:
    > The module PDF::Reuse (see CPAN) is more or less made for situations
    > like this. To avoid disappointments, I'll tell you what it does. It
    > opens a PDF file, and you can *add* new stuff on top of the old

    stuff,
    > draw on it. It *does not* search and replace some template text in

    your
    > PDF file. For blank fields, this might just work.
    >
    > --
    > Bart.


    Hi,
    yes, you are right. PDF::Reuse is the Perfect tool for the purpose I
    wanted. You are also correct about what it does (and what it does not).
    At least what you said more or less, sums it up.
    Thanks a lot Bart, I really appreciate your message.
    Aditya
     
    , Feb 18, 2005
    #6
    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. crazyprakash
    Replies:
    4
    Views:
    3,377
    adrian
    Oct 30, 2005
  2. Replies:
    0
    Views:
    591
  3. David Williams

    Re: Editing PDF files usig Python

    David Williams, Nov 7, 2009, in forum: Python
    Replies:
    0
    Views:
    523
    David Williams
    Nov 7, 2009
  4. Ricardo Pog
    Replies:
    1
    Views:
    435
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    383
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page