[CentOS] Mail Merge data to a pdf file by overlaying the data on the image

Gregory P. Ennis PoMec at PoMec.Net
Sun Jun 7 20:03:12 UTC 2015


On Sun, 2015-06-07 at 13:16 -0600, Frank Cox wrote:
> On Sun, 07 Jun 2015 13:10:52 -0500
> Gregory P. Ennis wrote:
> 
> > What I would really like to be able to do is to run a script that 
> > can
> > fill in the input fields of the pdf file on the fly and then create 
> > a
> > new pdf file with the same resolution as the virgin pdf file that 
> > has
> > the appropriate fields with entered data.
> 
> I wonder if you're starting from the wrong place.  Maybe you would be 
> better off creating your forms with tex and generating pdf's from 
> that.
> 
> Running "mailmerge with tex" through google provides all sorts of 
> write-up on how to do it.
> 

Frank,

I only wish that could be done.  Unfortunately, the pdf file is not
ours and we did not create it.  

I have downloaded pdftk 2.02 from the pdftk website and that fixed the
problem of not being able to open a 1.6 pdf file, but I have some
additional impasses. 

It looks like the pdf file we have been given is password protected so
that I can not merge data to it, or take a look at the fdf fields with
the pdftk dump_data or pdftk generate_fdf.  I was surprised by this in
that the file can be read by a gui application with inputs in the
fields without a password.  

We have application software that is required to fill in the blanks of
the pdf file with merged data.   What we are doing now to get the job
done is to create a pcl file from the pdf file using gutenprint of
gimp, and then modifying the pcl file with macro commands so that it
can be downloaded to an hp type printer and called as needed with
subsequent print commands to specified field areas on the page.  By
using this method we can print this on a pcl printer or send it to cups
-pdf to convert it back to a pdf file to fax or e-mail the pdf file
merged with the data.

I was hoping to be able to simplify all of this by using some tool to
fill in the fields on the pdf file on the fly.   

So far .... no cigar

Greg




More information about the CentOS mailing list