Ask A Question

Notifications

You’re not receiving notifications from this thread.

Align Images with Text

rikidev asked in Ruby

Hi I'm doing a report with ruby ​​prawn, the code below shows two images on video, the fact is that the two images are not aligned, so the image c is displayed much lower, my question is how do I align the two images at the same height?

Image of report: [https://imgur.com/a/dBtLKIG]

Code:

#Images
c=Dir.pwd+"/c.jpg"

#Report
Prawn::Document.generate("rapportino.pdf") do
float { text "Il Tecnico:", :align => :left}
  text "Il Cliente:", :align => :right
  move_down 8
  image c,  :width=>130, :height=>70, :position => :left
  image c,  :width=>130, :height=>70,:position => :right
end
Reply

have you tried using prawn tables ?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.