prawnpdf / prawn-table

Provides support for tables in Prawn
Other
205 stars 98 forks source link

Image Cell not maintaining full width due to long adjacent Text Cell #110

Open jfeust opened 5 years ago

jfeust commented 5 years ago

We want the left image column to be dynamic based on image size so we can't hard-code the width. The problem is, if we have long text content in the cell to the right of the image cell, it shrinks the image cell to smaller than the image size.

Prawn::Document.generate("hello.pdf") do
    long_text_string = "Test Copy " * 100
    table([[{image: open("https://www.placehold.it/200x200.jpg")}, long_text_string]])
end

Results In: screen shot 2019-01-01 at 3 12 17 pm