Using Flex/CSS with wkhtmltopdf
I resolved this issue using:
equivalent of display:flex;
==> display: -webkit-box;
equivalent of justify-content: space-between;
==> -webkit-box-pack: justify;
Some useful informations coming from: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1522
This worked for me :
.row {
display: -webkit-box; /* wkhtmltopdf uses this one */
display: flex;
-webkit-box-pack: center; /* wkhtmltopdf uses this one */
justify-content: center;
}
.row > div {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
}
.row > div:last-child {
margin-right: 0;
}
See https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1522 for more informations.
I used autoprefixer in my application to automatically add prefixes. You just need to update browsersList
with ie >= 9
.