Skip to content
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

Width of table and cells #313

Closed
piernik opened this issue Apr 6, 2018 · 6 comments
Closed

Width of table and cells #313

piernik opened this issue Apr 6, 2018 · 6 comments

Comments

@piernik
Copy link

piernik commented Apr 6, 2018

I think that calculating width of table and cells works differently than in TCPDF.

I tcpdf if You skipped table's width param it was always 100% and every column's was adjusting to remaining space.
<table><tr><td></td><td></td></tr></table>

In html2pdf If You want render n-columns You have to count and set width of every cell.

<table style="width:100%"><tr><td style="width:50%"></td><td style="width:50%"></td></tr></table>

Can I somehow force html2pdf to adjust columns width?

@pinksharpii
Copy link

Did you figure out a solution for this? I'm having issues with my table not taking up 100% width even though it's set to be. And image heights in the table are an issue.
screen shot 2018-06-20 at 8 31 40 am

@piernik
Copy link
Author

piernik commented Jun 20, 2018

I used different library.

@spipu
Copy link
Owner

spipu commented Jul 31, 2018

normally, image and tables work fine. How did you put your image in the td ?

@piernik
Copy link
Author

piernik commented Jul 31, 2018

@spipu as I wrote I used other lib and don't remember how I did it.

@spipu spipu closed this as completed Jul 31, 2018
@leereichardt
Copy link

@spipu as I wrote I used other lib and don't remember how I did it.

Care to tell anyone what you used or just going to keep that a secret?

@piernik
Copy link
Author

piernik commented Jul 23, 2020

I used https://github.com/mpdf/mpdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants