Re: creating pdf with input fields

Bill Luebkert <[email protected]> Sat, 02 Apr 2011 20:46:52 -0800
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <[email protected]>
On 4/2/2011 8:37 PM, Tim Bolshaw wrote:
> On Sun, Apr 3, 2011 at 9:12 AM, john depasquale <[email protected] <mailto:[email protected]>> wrote:
>
>     Hi all,
>
>     I’m trying to determine if there’s a perl module with which I can create pdf files and create input fields in the file( form fields? ), so that the recipient of the pdf file can open it, fill in those fields, and save the file. I’ve looked at the module pdf::api2 but it appears to only allow me to create pdfs and insert text and images, but not create input fields( unless I’m just not understanding it’s capability ). Is there such a module for perl?
>
>     Thanks much.
>
>
> I am not a PDF expert, but did look into this at one point.  You may be trying to do something that Adobe specifically blocks.  If your users are going to open the PDF in Adobe Reader, then saving the file will not be possible.  My understanding is that the best you can do is have the PDF file have a submit button that creates or mails an FDF or XML file.  You probably want to read up on the Adobe FDFToolkit.  Once upon a time, Adobe provided a Perl interface to this.  You may also find PDF::FDF::Simple might be part of the solution.
>
> I eventually decided to approach this kind of functionality another way.  As an example, you could generate an Excel spreadsheet in which all cells except those you want the user to fill in are locked.  Modifying the cells programmatically is possible without unlocking the cells.  Thus, you create a base template and lock in down.  Later, your perl script customizes specific cells and sends it to the user to fill out.
>
> Let us know if you find something better, or if any of the information above is wrong.

Or just create a GUI app that gets the fields from the user and
creates the PDF file from the data inputted.  Then you don't need
to worry about having a license for one of the Adobe apps that
can modify fields etc.  I think the PDF module can then handle
creating the resultant file you want.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs