-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
column widths not working #152
Comments
I've seen that by setting exact widths for all columns, it works. I tried this: |
in case someone else finds this, this seems to be the best solution: |
Thank you, I can confirm this worked for me too! For a more flexible pattern, I did this: def column_widths
cols = {
0 => 25,
2 => 26,
3 => 35
}
# Calculate width for remaining column due to https://github.com/prawnpdf/prawn-table/issues/152
cols.merge({
1 => pdf.bounds.width - cols.values.sum
})
end You can use the hash form to specify the column index. |
In case it helps anyone I just find out this should be
Use |
Hi! I got a table with subtables inside. I can successfully control the subtables' column widths but not the main table ones.
Here's the code and below the result. If TLDR, important code is towards the end.
You can see the footer table respects the widths I've set, but the main content's columns have equal widths.
Thanks in advance!
The text was updated successfully, but these errors were encountered: