flyingsaucerproject/flyingsaucer — comment on commit 879723fd3cbf80c63ba5e6b45e3f70bf98ea1dc8
File: src/java/org/xhtmlrenderer/pdf/TextFormField.java line 63
By trejkaz:

This is generating the width of the string in spaces, but this doesn't appear to allow adequate space to fit the text.

I tried size="8" which is enough to comfortably fit the text "Hi there!" (fills up 2/3 of the text field in Webkit.) Rendering this with flyingsaucer, it fits "Hi, th" with a tiny slice of the "e" peeking through.

The HTML standard doesn't specifically say *which* character to use the width of here, but I assume people are picking en or em.