Pergunta

I am experimenting with Mediawiki Collection extension, for generating books from my articles (which I find very useful). However it doesn't render everything in the same way my mediawiki instance does.

Namely,

  • mathjax elements don't render
  • and pictures don't render as well

For instance, here how things get rendered by wiki enter image description here

And how they end up in the pdf generated by Collection enter image description here

I understand the reasons behind this behavior: the rendering is done not by my wiki, but by some external service, which has no idea about my client-side plugins.

My question is: how can I get my wiki render all the pages I want, possibly in HTML with all client-side extensions, and then convert the results to PDF?

When I open a page in "printable" view (with &printable=yes) it renders everything as I want. It could be nice to use that to render multiple pages at once (this is in essence what Collections does...)

Thanks

Foi útil?

Solução

I ended up creating an extension that takes a list of pages and renders them all to a single page. After that I can just print it

The code is available here

This is how it looks like in PDF now:

enter image description here

Also you can add &printable=yes and it will give you a fully prepared printable version which you can just save as HTML.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top