Adding form element to output

Poppler takes care of almost everything, I simply added the form tags at the end of every page.
Both types of input (radio or checkbox) simply do not behave the same way they do in HTML, compared to a PDF. Please see a these examples : https://dl.dropboxusercontent.com/u/7037559/checkbox-sample.zip 

The first problem is they're not uniform, it is up to the user creating the PDF I assume. This is minor and I'm currently not taking care of this, replacing these by a pre-determined image. The main problem is their position : right on top of existing text. Using a html input there would be quite ugly, I think. I might just place it next to the text then - but in some documents, the position of the element is not right on top of the "a)" but to the left. Which is hard to know beforehand, since again, it is up to the user creating the PDF.

So basically, form inside of PDF document do not behave or respect the same set of rules they have in HTML. As such I had to take a few liberties to adapt the display.