text placement bug #1

martianinteractive opened this Issue Dec 14, 2011 · 3 comments

2 participants


First, thanks for publishing this gem. I tried it on a couple of PDF forms. For the text to fall in place correctly I had to offset the field's "y" value by 40 on line 207 of prawn-fillform.rb as follows:

          text_box value, :at => [field.x + 2, field.y - 40]

Have you seen this happen before? Any idea why it happens?


I have no idea. Perhaps software dependent. Forms created with adobe seems to be correct. At the moment I have no time to fix it. Sorry.


1) Used Adobe Acrobat Pro 9 to create the form.
2) I wasn't asking you to fix it.


The field, button and text class parse some info, You can override these things like

data[:page_1][:firstname] = { :value => "Max", :options => { :width => 200 } }

I could implement to override :x and :y, but this seems to me not very elegant. Sorry for my englisch.


data[:page_1][:firstname] = { :value => "Max", :options => { :width => 200, :x => 2, :y => -40 } }

and this for every field

@netinlet netinlet referenced this issue Mar 5, 2012

Fix for Issue #1 #2

@moessimple moessimple closed this Aug 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment