Closed arjay54 closed 3 years ago
Normally dw2pdf uses the print version of your wiki article (a html version with minimal css style).
I see there is a separate renderer for odt. Not sure if that is needed
Did you test it already? What is the current result?
On the screen:
Syntax:
{| class="danger"
|rowspan="2"|{{ :warning_icon_red.svg?100 | Signal Word }}
!Signal Word
|-
| **Type of danger and source** \\
Consequence of the danger \\
* Instruction to avoid the danger
|}
In PDF:
Was a matter of CSS and usage of SVG as image. Using PNG was ok. However list items still have a line break after the bullet point.
Thanks for your feedback.
Here you can find some tips to see which code and how it looks just before it goes into the mPDF-library. https://www.dokuwiki.org/plugin:dw2pdf#how_to_collect_more_debug_info The mPDF-library is used to convert the html to pdf. Could be the line breaks are not completely supported by the mPDF-library, so might needs some extra work. (list of supported css https://mpdf.github.io/css-stylesheets/supported-css.html)
The lack of css code could be probably because intentionally the print version of the webpage is used for creating a pdf. Some plugins needs specific css changes. The required css can be added by creating a pdf.css file. (see also https://www.dokuwiki.org/plugin:dw2pdf:exportsupport)
For more personal changes, you can create your own template for mpdf. https://www.dokuwiki.org/plugin:dw2pdf:pdftemplate (copy the default template, and add there your changes. Please do not modify the 'default' template. It will be overwritten at update of the plugin.)
If you found useful improvements of the css, could you share them here as well? If you know how to contribute you might propose them as pull request to the Extended Table Syntax 3 Plugin as well. Otherwise, I will try to have a look into it in a later stage, to see how we could get this into that plugin.
Dear Gerrit,
many thanks for your comments. Actually the table output is ok, no problem anymore. The reason was that I used an SVG for the warning icon. Now, with a PNG it renders ok.
The last remaining problem is that when using a list within a table the PDF renders differently from the screen: a line break is inserted after the marker.
PDF:
Screen:
HTML:
It seems a matter of the HTML code that is produced. Differences seem to be the additional div element and the classes added using the standard DokuWiki syntax over the inline HTML which works.
I found out now that the div element causes the line break in the PDF.
Best regards, René
Is a problem of mpdf: https://github.com/mpdf/mpdf/issues/1450
Is there a chance to include support for this plugin or another plugin that allows MediaWiki-style tables?