FDF to PDF in Python?

Andreas Lobinger andreas.lobinger at netsurf.de
Tue Apr 6 05:14:57 EDT 2004


Aloha,

Sean Berry schrieb:
> I am doing a project which will require me to take an FDF and convert it to
> a PDF after some information has been filled out.
> Is there anything in Python that can help me with this?
> I go the FDFToolkitforUnix from Adobe, but it is in Perl and I would much
> prefer Python.  Has anyone out there done anything like this before?

First of all, the FDFToolkit is (afair) a .so with Perl bindings, so
using SWIG (or similar tools) you could build adequate Python bindings...

The usual way to use .fdf is:
- Create a .pdf with form functionality and a means to submit data
- Open the file with a web-browser using the AcroReader as plugin
- Insert and Submit data to a web-server (the data can be submitted in
 html/fdf)
- Build another .pdf with the data

The FDFToolkit is only a parser (afair) for .fdf files/data. To insert
your data permanently (which means, you can save/copy/print the .pdf (with
the AcroReader)) you need a solution to access (read/modify/write) .pdf 
files. 

For all 4 above points there are thinkable python solutions. f.e. 
i have (very experimentally) handcrafted an example with a .pdf
using formfields and a (python) web-server that collects the data
and inserts it at the end of the .pdf, so that the submitted data
is logged in the file. If you're interested in this -> mail me.

For more information about working with .fdf and solutions
i would suggest to read comp.text.pdf .

Wishing a happy day
		LOBI



More information about the Python-list mailing list