Project Information
- Name of tool/project: ElectronPdfService Extension
- Project home page: https://www.mediawiki.org/wiki/Extension:ElectronPdfService
- Name of team requesting review: WMDE-TechWish (Wikimedia Deutschland)
- Primary contact: @Tobi_WMDE_SW @WMDE-Fisch @Bmueller @Lea_WMDE
- Target date for deployment: December 2016
- Link to code repository / patchset: https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ElectronPdfService
- Programming Language(s) Used: PHP (mainly), JS (few)
Description of the tool/project
The ElectronPdfService extension provides access to the Electron Service for browser based PDF rendering.
Description of how the tool will be used at WMF
The extension adds a new "Download as PDF" link to the MediaWiki sidebar. By clicking it, the actual page is rendered as PDF using the Electron PDF service. If the Collection extension is installed and provides another method for PDF rendering, clicking the "Download as PDF" link will provide a selection screen (see https://phabricator.wikimedia.org/T142201#2660206) to choose between the Electron rendered PDF and the rendering provided by the Collection extension.
Dependencies
- Electron PDF Service (testing-only instance currently deployed at https://pdf-electron.wmflabs.org). Ticket for productizing: T142226.
- Collection Extension: No hard dependency, but different behavior when installed.
Has this project been reviewed before?
Only review inside the WMDE-TechWish.
Working test environment
- git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ElectronPdfService
- add to LocalSettings:
wfLoadExtension( 'ElectronPdfService' ); $wgElectronPdfService = [ "serviceUrl" => "https://pdf-electron.wmflabs.org", "format" => "pdf", "key" => "secret", "pageUrl" => "https://en.wikipedia.org/wiki/Caipirinha" ];
- In order to render a page, it needs to be publicly accessible. If testing on local machine, you need to add one in the "pageUrl" setting (see above).