prawnpdf / prawn-table

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

better error message for small container for table #111

Open Alan-M-Thomaz opened 5 years ago

Alan-M-Thomaz commented 5 years ago

Table's width was set too small to contain its contents (min width 540.0, requested 523.28) when called for pdf.table(table_content, header: true, column_widths: [100, 100, 340]) that is a bit confuse, since i "requested" 540 width in column_widths

the problem was that the container(page, bounding_box, or whatever the table is in) it self was 523.28, take me a while to figure that the problem, would be better some message like Container is to small to contain the table(requested width: 540, container width: 523.28

pointlessone commented 5 years ago

I agree the message is confusing. Would you have some time to contribute a fix for this?