Mpdf plugin - unmaintained?

On our recent upgrade to 5.9.0 I was notified that the mpdf plugin is now marked as unmaintained by the vendor and to investigate 3rd party solutions for the future. Does anyone have an insight on this?

Best,
Michelle

This was a plugin written by Brad Payne at BCcampus. He’s since left his position there and BCcampus has decided to stop actively developing the plugin. It can still be downloaded from GitHub at GitHub - BCcampus/pressbooks-mpdf: [UNMAINTAINED] open source HTML to PDF conversion and used as long as it still works, but my understanding is that there is no one currently maintaining it, so once it breaks, there’s no one around to maintain it. We did not write the plugin and we will not be adopting it/moving it into Pressbooks core, as we use PrinceXML on our hosted networks. We will be updating our installation docs to let users know that the open-source alternative has been abandoned and is now ‘use at your own risk.’ If you know of someone who is interested in adopting or maintaining the plugin, we’d be happy to put you in contact with Brad or BCcampus colleagues who might be able to give you some assistance/advice in doing so.

Source: https://github.com/pressbooks/docs/issues/32#issuecomment-503255424

2 Likes

Michelle,

You might want to look at the Prince Non Commercial License and decide whether you feel your use of Pressbooks would meet these criteria.

As an OER Librarian, I suspect you will, and you’ll get nicer looking exports.

https://www.princexml.com/purchase/license_faq/#non-commercial

One of the requirements of the license is that there is a link to their webpage in a prominent location on your website. I wrote up a little review of PrinceXML, DocRapter, and mPDF and stuck it on my sites homepage.

https://oer.ed-beck.com/prince-xml-and-open-educational-resources/

Hey there,

Do you know if PrinceXML seamlessly integrates with Pressbooks? Or would we need to do some integration work with it.

Pressbooks is set up to use PrinceXML. It is the preferred, supported option.

You have to install PrinceXML and xmllint on your server, and then you have to set the path to Prince in your wp-config.php file.

If you are looking at this installation guide, what I’m talking about is Part III

1 Like

Clarification of thread title… MPDF itself is maintained:

What’s not maintained is BCcampus/pressbooks-mpdf, a plugin that uses MPDF to generate PDFs in Pressbooks without Prince.

Random side tangent: Any developers out there? At Pressbooks we :heart: PrinceXML so what I’m proposing is not on my roadmap, but here are two viable alternatives to MPDF (that do not exist yet because no one has developed them for Pressbooks, yet!):

Basically, instead of passing the CSS/HTML/JS that we pass to Prince… pass those file combos to (headless) Chrome. Chrome would generate the PDF.

Would require some finangnling, but with pagedjs, probably a lot less than what was going on with the BCCampus Pressbooks-MPDF plugin.

Regards,

1 Like

Hey there

I’m julien, working with fred and julie on paged.js. Since it’s working with any HTML and has a real simple API to manage standard css for print, i think that it could fit your needs. There are also a couple of paged.js plug-in being built for wordpress these days, but it’s only for previewing and generating PDF in the browser.

We managed to have some nice book printed and pdf generated with the library over the last year, using w3c standards, and we’re working on a CLI version that could handle server-side rendering, so we’d be happy to help you build that plugin.

You could use paged.js polyfill as a previewer of your book in the browser and/or have paged.js CLI (https://gitlab.pagedmedia.org/tools/pagedjs-cli) to generate PDF on the fly. Plus, we’ve been exploring meta-data export, tagged pdf and color management to be added to the CLI in the coming months.

How could we help you all to make that plugin happen?

2 Likes

Fun hack.

In Pressbooks export an EPUB.

In Calibre convert the Pressbooks EPUB to PDF. Can be done at the command line: ebook-convert.exe test.epub test.pdf

Looks pretty good!

Probably easier to wrap ebook-convert than maintain this MPDF plugin…

1 Like

Hi,
When I select PDF (mPDF) and trying to export Book it is showing this error
EventStream Connection Error ([Reload](javascript:window.location.reload(true))) and it is loading and loading.
How to fix this issue?
Thanks

I do print the pages to pdf, but one by one. So people can pick those that they require to print