Reputation: 1842
In our webapp we give the customers the option to make a PDF of some user-generated HTML forms. The PDF files are created by OpenOffice 3.3 and the resulting PDF contain interactive form fields.
The problem is that fields that are prefilled with data show differently on different PDF viewers. In Adobe Reader the fields look like this, with the values at the bottom (and partly hidden) of the fields:
In Foxit Reader (and other readers I've tried) the PDF looks like this:
Why is this happening?
Edit: Following yms' suggestion; This is an example PDF with problematic interactive form fields.
Upvotes: 1
Views: 1223
Reputation: 10418
There is something strange in the Font objects of your PDF files. The Descent attribute of the font descriptors seems to have an incorrect value that is been ignored or corrected by third-party readers but it is been "honored" by Adobe Acrobat Reader.
From the PDF Reference Document:
Attribute: Descent
Type: number
Description: (Required, except for Type 3 fonts) The maximum depth below the baseline
reached by glyphs in this font. The value is a negative number.
In the file you posted, the Font descriptors look like this:
12 0 obj
<<
/Type/FontDescriptor/FontName/CourierNewPSMT
/Flags 5
/FontBBox[-121 -679 622 1021]
/ItalicAngle 0
/Ascent 832
/Descent 300 <- This guy here was supposed to be negative
/CapHeight 1020
/StemV 80 >>
endobj
As a workaround, you could try using a different font on whatever tool you are using to generate these files, or you could try reporting the issue back to the developers of the tool.
Upvotes: 1