One more suggestion: with PdfWriter, you can programmatically produce
PDFs
with proportional fonts, placing each text on its precise coordinates.
You can achieve nicer output, if the required processing is feasible.
so i want to create print details in .rhtml format
I can’t help you with a general solution, I guess the way you startes
is the way to go.
Though:
you don’t need p there - instead of <%=p just leave there <%=
create a helper function to pad the string to desired width
def pad(lenght, data)
data.to_s.just(length)
end
then you can do:
<%= pad 28, name %><%= pad 15, phone_number %> etc.
I quite can’t imagine what you mean by “define the width at
dynamically for any type of erb tags”.
Don’t worry though, the problem is most probably somewhere between my
keyboard and my chair
J.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.