moessimple/prawn-fillform — pull request #2 by netinlet (2012-03-05 23:33:35+00:00)
Title: Fix for Issue #1

Was running into the same issue reported in #1 https://github.com/moessimple/prawn-fillform/issues/1

For whatever reason, a opening an Adobe pdf with Scribus is analogous opening a Word Document with OpenOffice - the words are there, but the formatting is off. This is probably why the offsets show up differently for Adobe documents but work with Scribus documents.

This patch adds class level support for setting an x and y offset. The default values are the same as the existing x/y offset in Prawn::Fillform#fill_form_with so as not to break compatibility. There is a convenience class method #use_adobe_xy_offsets! which give a reasonable defaults for using generated forms.

You can also pass in :x_offset and :y_offset hash keys to Prawn::Fillform#fill_form_with so you can render with individual x/y offsets.

Let me know if you have any questions or issues with the patch.

Thanks