Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Merging an FDF into a PDF

by Wally Hartshorn (Hermit)
on Sep 20, 2002 at 18:58 UTC ( #199582=perlquestion: print w/replies, xml ) Need Help??

Wally Hartshorn has asked for the wisdom of the Perl Monks concerning the following question:

When a user fills out an Acrobat form, the data that they have entered can be exported into an FDF file. We would like to write a Perl program that will take the original PDF file, fill in the fields with the data from the FDF file, and then write out a new PDF file.

Is there a Perl module that will do this?

Wally Hartshorn

Replies are listed 'Best First'.
Re: Merging an FDF into a PDF
by George_Sherston (Vicar) on Sep 20, 2002 at 20:49 UTC
    The second half of your challenge, AFAICS, is in principle the same as writing an on-the-fly PDF doc from any data source. If that's right, then it's a subject I've grappled with a little bit, and where I've found the existing PDF modules didn't do quite what I wanted for the most part - surprising, given what one comes to expect to find at CPAN, and a challenge for a module writer perhaps.

    I settled on PDF::Create, which has relatively limited functionality, but is easy to learn and very much does what it says on the can. I also wrote some routines which are half way between script and module, that I used to extend its capabilities. They, and some other things you might find useful, are in this thread.

    If you do find something that works, it would be interesting to know about it - good luck!

    George Sherston
Re: Merging an FDF into a PDF
by sauoq (Abbot) on Sep 20, 2002 at 19:06 UTC

    The PDF library available on CPAN might help you get started. It should handle reading and writing the PDF. I don't know whether it would help in extracting data from the FDF files.

    -sauoq
    "My two cents aren't worth a dime.";
    

      I did a search for "PDF" on CPAN before I posted my question and came up with 99 matches. (Yikes!) I browsed the docs for the ones that looked most likely, but for the most part they seem to be oriented towards delving very deeply into the structure of PDF files -- and apparently don't mention FDF files at all. :-(

      In contrast, Adobe's FDF Toolkit talks a lot about the FDF files -- but not about the PDF files. (Doh!)

      Wally Hartshorn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://199582]
Approved by sauoq
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-06-26 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (83 votes). Check out past polls.

    Notices?