DEV Community

loading...
Cover image for How to Convert HTML Tables into Beautiful PDFs

How to Convert HTML Tables into Beautiful PDFs

Tyler Hawkins on November 10, 2020

Web apps that contain tables, charts, and graphs often include an option to export the data as a PDF. Have you ever wondered, as a user, what's go...
Collapse
azettl profile image
Andreas

You should also check out pagedjs.org/ and maybe weasyprint.org/. There are lots of rendering tools that have the complete CSS Paged Media Draft implemented.

Some of them you could try out on my website printcss.live/.

Collapse
thawkin3 profile image
Tyler Hawkins Author

The interactive playground you have on your PrintCSS site is really neat! Thanks for sharing and for your work on this.

Collapse
xaddict profile image
Luuk Lamers

I think it would be added value if you also tested whether the text is still selectable in the PDF (probably not the case with jsPDF), whether table styling can be controlled with print media styles and whether the document padding and margin can be changed with pages media css styles.

Collapse
manishfoodtechs profile image
manish srivastava

Thanks for sharing

Collapse
billraymond profile image
Bill Raymond

You are right. I have been looking to see what’s under the hood, so thank you! Do you know if any of these can be used at build time for static sites like Jekyll?