Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   editing pdf files with perl (http://www.velocityreviews.com/forums/t890832-editing-pdf-files-with-perl.html)

aditya2507@gmail.com 02-14-2005 06:27 PM

editing pdf files with perl
 

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


pikus 02-15-2005 03:36 AM

Re: editing pdf files with perl
 

Bill Segraves wrote:
> <aditya2507@gmail.com> wrote in message
> news:1108405623.370567.287490@o13g2000cwo.googlegr oups.com...
> >
> > 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


aditya2507@gmail.com 02-15-2005 03:36 AM

Re: editing pdf files with perl
 

Bill Segraves wrote:
> <aditya2507@gmail.com> wrote in message
> news:1108405623.370567.287490@o13g2000cwo.googlegr oups.com...
> >
> > 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.


Lambik 02-15-2005 08:45 AM

Re: editing pdf files with perl
 
aditya2507@gmail.com 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 )





Bart Lateur 02-18-2005 09:56 AM

Re: editing pdf files with perl
 
aditya2507@gmail.com 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.

aditya2507@gmail.com 02-18-2005 11:47 PM

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



All times are GMT. The time now is 04:22 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.