Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3 multi-column layout converting to PDF using snappy (wkhtmltopdf wrapper)

I'm trying to generate 3 column PDF (using barryvdh/laravel-snappy - wkhtmltopdf). Because the text which is going to fill these columns is of unknown length I have to use some mechanism allowing the text fill the columns freely. So I tried to use this CSS:

.threecol {
            -webkit-column-count: 3; /* Chrome, Safari, Opera */
            -moz-column-count: 3; /* Firefox */
            column-count: 3;
        }

This works great on a web page but I can't convert it to PDF. It doesn't show any errors. It simply converts the page with one column. Any suggestions? Is what I want possible to do with wkhtmltopdf? Or maybe should I use some other library?

like image 768
Kornel Avatar asked Oct 31 '22 04:10

Kornel


1 Answers

This feature isn't available in the Webkit version used in wkhtmltopdf. Looks like we have to use tables, with manual flow.

like image 125
Milkmannetje Avatar answered Nov 08 '22 05:11

Milkmannetje