splitbrain / dokuwiki-plugin-dw2pdf

A fork of Luigi Micco's PDF export plugin for DokuWiki
http://www.dokuwiki.org/plugin:dw2pdf
55 stars 68 forks source link

Solved: Table vertical cell alignment differs from DokuWiki #404

Closed bomhard closed 2 years ago

bomhard commented 4 years ago

Great Plugin, thanks a lot. But we found one issue:

Tables with multiple lines are rendered with vertical-top-alignment which makes sense in most cases. In the pdfs however vertical alignment is centered which can be really more than a cosmetic flaw with larger multi-line tables.

Best NIkolaus

Klap-in commented 4 years ago

The pdf creation is performed by the mpdf library. Unfortunately the library doesn't support all details of css. So it could be that alignment is not support in the way you need. e.g. sometimes inline css solves it. The plugin has some option to observe which html and css is going into it. And in the manual you have some explaination e.g. https://mpdf.github.io/css-stylesheets/supported-css.html

bomhard commented 4 years ago

Thanks a lot. Creating DWDIR/lib/plugins/dw2pdf/conf/style.local.css with:

table { vertical-align: top; }

solved the issue. Should be part of the default style.css to match rendering.