in reply to Replacing text in a PDF file

I've been wondering why there isn't a way to template the forms like HTML pages can be. There is probably something I'm not getting about PDFs, I use them but do not know their coding. I would love to be able to layout the document in any app, put in say %firstname% %lastname% and then later insert this data. Is there anything out there that does this? Might be ultimately what you are looking for?? This would be the solution of a lifetime for me...

Replies are listed 'Best First'.
Re: Re: Replacing text in a PDF file
by Basilides (Friar) on Jun 19, 2003 at 09:01 UTC
    I think PDF::Reuse will be just what you need. I had a look at it yesterday after nite_man's recommendation. It looks like an excellent module, and has the very useful PDF::Reuse::Tutorial to accompany it. Example 15 of this tutorial appears to be very much along the lines of what you're describing. The only thing is that it uses absolute x/y positions for insertion, rather than searching and replacing a specified string, so it's no good for me.
      This PDF::Reuse looks pretty good from what I can see so far, 5 minutes. Looks like I would just need to specify where I want to put my info on the form, text and font etc. My ultimate goal is to let the graphics department freely(almost) manipulate the layout and fonts, etc. without me having to make constant changes. If they suddenly think the name or address need to be in a different font, just change the template and the problem is solved. I know it might be a pipe dream but it seems like this is a much needed function. There are LOTS of forms used everyday, why not be able to lay them out in anything and then fill them out as you go...
Re: Re: Replacing text in a PDF file
by Willard B. Trophy (Hermit) on Jun 19, 2003 at 13:49 UTC
    The Acrobat FDF Toolkit might be what you're after. And they claim there's a Perl API there, too.

    I dunno if Adobe are still as actively pushing PDF+FDF as a consumer web form solution as they used to be. Some basic information is in Thomas Merz's "Web Publishing with Acrobat/PDF" (Springer-Verlag, 1998, ISBN 3540637621).

    --
    bowling trophy thieves, die!