Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; use CAM::PDF; my $infile = 'acc.pdf'; #template my $outfile = 'acc_new.pdf'; # new filled up pdf to serve to the user. my $pdf = CAM::PDF->new($infile) or die 'error'; my @FIELDS = $pdf->getFormFieldList(); my %fields = ( 'name' => 'Joe test', 'address' => '100 Main Street', 'account_number' => '000007', 'date' => '05/19/2011', 'place' => 'USA', ); foreach my $field ( @FIELDS ) { $pdf->fillFormFields(%fields); $pdf->fillFormFields($field => $field); #sets the value of th +e field to the field name. } close(DATA); $pdf->cleanoutput($outfile);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Saving or emailing a filled PDF form Help!
by wind (Priest) on May 19, 2011 at 17:27 UTC | |
by Anonymous Monk on May 19, 2011 at 19:50 UTC | |
|
Re: Saving or emailing a filled PDF form Help!
by LanX (Saint) on May 19, 2011 at 16:56 UTC | |
by sl7020 (Initiate) on Dec 30, 2016 at 17:28 UTC | |
by LanX (Saint) on Dec 30, 2016 at 18:40 UTC |