All threads / Align Images with Text
Ask A Question


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: []



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

have you tried using prawn tables ?

Join the discussion

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

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

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

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.