synergylearning / moodle-local_wikiexport

This Moodle plugin adds the ability to export Moodle wikis as either PDFs or epub documents.
GNU General Public License v3.0
3 stars 4 forks source link

Plugin Wiki - Tables in PDF #6

Open pax77-dd opened 3 years ago

pax77-dd commented 3 years ago

Hello,

we are running Moodle 3.10 .

We want to be able to save the wikis as PDF (the result of the existing on-board tools does not look so nice). For this we have installed the plugin "Wiki export". So far it works without problems. However, tables are not converted correctly. They are very compressed and most of the content is missing.

Since the plugin "Wiki export" is only released up to Moodle version 3.1, this is probably due to the incorrect display of the tables.

Is there another solution to export the wikis to PDF? Or can the plugin simply be adapted?

Best regards

pax

davosmith commented 3 years ago

It's highly unlikely to be a problem with the Moodle version - the plugin uses whichever version of the TCPDF library is included in the version of Moodle it is installed with to handle the conversion of the HTML into a PDF. This means that if there is a problem converting the tables, then it is a limitation of TCPDF (or the styling of the tables included in the wiki page).

If I knew of another way of exporting wikis to PDF, then I probably wouldn't have been paid to write this plugin ...

This plugin is open source - you are very welcome to adapt it to use a different HTML to PDF library (e.g. there is a list of possible options here: https://ourcodeworld.com/articles/read/226/top-5-best-open-source-pdf-generation-libraries-for-php ) - if you find a substantially better option, then I'd be happy to review, and potentially integrate, a patch that implements it.