I dug through the source and I believe I need to call addFont(page, fontname, fontlabel, [fontmetrics]). The module docs state that you must call addFont for all but the 14 core fonts. I don't know what to pass to this method. Does anyone have experience with this? Is there a better/alternate method? Thanks for your help.Could not find resource /CourierNewPSMT while preparing form field
I also tried running this code, although it is labelled for internal use only:use strict; use warnings; use CAM::PDF; my $infile = 'input.pdf'; my $outfile = 'output.pdf'; my $pdf = CAM::PDF->new($infile) or die 'wtf'; my @FIELDS = $pdf->getFormFieldList(); $pdf->fillFormFields($FIELDS[9] => 'test'); $pdf->cleanoutput($outfile);
$pdf->_buildNameTable(1); my $properties = $pdf->{Names}->{1}; use Data::Dumper; print Dumper($properties); __END_- $VAR1 = { 'TT2' => bless( { 'gennum' => '0', 'value' => '39', 'type' => 'reference', 'objnum' => '8' }, 'CAM::PDF::Node' ), 'TT0' => bless( { 'gennum' => '0', 'value' => '22', 'type' => 'reference', 'objnum' => '8' }, 'CAM::PDF::Node' ), 'TT1' => bless( { 'gennum' => '0', 'value' => '32', 'type' => 'reference', 'objnum' => '8' }, 'CAM::PDF::Node' ) };
In reply to Filling PDF forms using CAM::PDF by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |