Search code examples
pdffdf

Why does pdftk chop the tops off the characters in my form fields?


When I populate acrobat form fields by importing an FDF file into NitroPDF, things look fine. When I type data into the form fields manually in Acrobat 8, things look fine. When I use pdftk (on Windows XP or 2K), the tops of the characters in each form field are chopped off. Is there a parameter I'm missing somewhere? There aren't that many settings in pdftk...

Here's what I'm running:

pdftk form.pdf fill_form data.fdf output out.pdf flatten

Digging deeper, it appears supplied text:

<</T (A) /V (123)>>

Gets reworked to:

<</T (A) /V ([fe][ff][nul]1[nul]2[nul]3)>>

(I determined this by loading an "un-flattened" out.pdf into NitroPDF and exporting the FDF).


Solution

  • I ended up proofing the document using pdftk and Acrobat Reader as I worked, instead of the import in NitroPDF. It appears that the baseline for the characters is different. To get the results I was after, I had to make each field about twice the height required by NitroPDF and overlap fields.

    I would still recommend NitroPDF for the rest of its capabilities.