Reading/Web/PDF Rendering

About
Currently rendering pdf articles from Wikipedia pages is handled by a service called OCG. When rendering "books" through the book creator, it uses OCG as embedded within the Collection extension. OCG has multiple issues, especially with tables. The Wikimedia foundation would like to work on enhancing the end result of the rendered pdfs, in a way that meets community needs. The technology solution that we would like to propose is to move from OCG to Electron, an underlying service that supports browser based rendering.

On this page, we are laying out the problem, and our proposed solution, the plan below is tentative, just to give clarity around tasks vs timeline, please feel free to add your comments and suggestions accordingly. This work is building on the WMDE lead initiative on enhancing tables in PDF printing.

When you click "Download as PDF" on the side menu, a screen similar to the below is displayed, where a the pdf is available for download shortly after the article is ready. The result will not include tables.

For example, check the rendered pdf for the article on list of country codes which contains a big table, that is not captured at all by the current rendering service.

Proposal
Replace OCG with Electron. OCG, the service that is currently used basically does the following: OCG is currently not well supported by the WMF and there are difficulties with Latex that have disabled table rendering in pdfs. Latex is a fairly brittle framework which is not well-suited to our flexible content-types. Furthermore, bugs in OCG or the Collection extension have greatly diminished the 3rd use of OCG (creating books). Please check earlier OCG discussion here and here.
 * 1) Converts wikitext pages to latex-formatted-pdf and plain text. In the past, it has also supported zim, epub and possibly more
 * 2) When integrated with the collection extension, it collates articles selected by a user into books + creates a table of contents

It is our hope that moving to a browser based PDF rendering solution such as electron, would enhance both PDF output and limit maintenance. The new service is currently in use on mediawiki.org (try the "Download as PDF" option in the left-hand menu) and a few other wikis and will be responsible for the underlaying PDF conversion, without major changes to user workflow.

Implications
The implications of this change are two-fold.
 * 1) PDFs will look more like the images above and less like the current 2-column layout.
 * 2) Books created in the book creator will potentially lose the following features:
 * 3) * Paper size selector
 * 4) * table of contents creation
 * 5) * adding custom chapters
 * 6) * plain text rendering
 * 7) * selecting number of columns (these are discussed on phabricator here)

Current status

 * Mediawiki and a few other wikis have already deployed changes to how printing PDF works, but have not yet made changes to the book creator tool
 * New PDF styling is available for review above and should be rolling out in March.
 * A proposed workflow of all details is elaborately explained here

The ASK
Please let us know how you feel about this. Of the features mentioned in the "implications" section above, which ones would cause problems for you?