Open main menu

Extension:ElectronPdfService

This page is a translated version of the page Extension:ElectronPdfService and the translation is 7% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎français • ‎português do Brasil • ‎русский • ‎中文 • ‎日本語
Manuel des extensions MediaWiki
OOjs UI icon advanced.svg
Extension:ElectronPdfService
État de la version : beta
ElectronPdfService-mockup.png
Implémentation User interface
Description Fournit un accès au service Electron pour un rendu PDF sur navigateur
Auteur(s) Wikimedia Germany (WMDE) – Roadmap
Dernière version continuous updates
Compatibility policy release branches
MediaWiki 1.25+
Changements
base de données
Non
Licence GNU General Public License 2.0 or later
Téléchargement
Exemple Wikipedia article
Traduisez l’extension ElectronPdfService sur translatewiki.net
Vérifiez la matrice des utilisations et des versions.
Problèmes Tâches ouvertes · Signalez un bug

L'extension ElectronPdfService fournit un accès au service Electron pour le rendu PDF sur navigateur.

Description

The extension provides a handy way to access the Electron Service via a RESTBase API endpoint . The Electron Service provides a new rendering method for wiki-pages as alternative to the existing OCG/LaTeX rendering. The huge advantage of using the Electron Service is, that the generated PDF will contain all tables as well as rendered infoboxes and other templates which was not possible with the old method. Read more on the background of the motivation for the extension and the service.

And here's an example: PDF for the article about Berlin.

Installation

  • Install and configure an Electron Service exposed over a RESTBase API endpoint
    • Follow the service install instructions & verify correct functioning with http://your-host:port/pdf?accessKey=your-key&url=article-url
    • Install RESTBase, and set up a config similar to config.example.wikimedia.yaml. Adjust the PDF server URL to reflect your host & port.
  • Téléchargez et placez le(s) fichiers (s) dans un répertoire appelé ElectronPdfService dans votre dossier extensions/.
  • Ajoutez le code suivant à la fin de votre fichier LocalSettings.php :
    wfLoadExtension( 'ElectronPdfService' );
    $wgElectronPdfServiceRESTbaseURL = '/api/rest_v1/page/pdf/';
    
  •   Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.

Ubuntu 16.04.3 (Local Install)

When installing on Ubuntu Server 16.04.3 LTS, the following configuration was needed instead:

$wgElectronPdfServiceRESTbaseURL = "http://HOSTFQDN:3000/pdf?accessKey=secret&url=http://HOSTFQDN/wiki/";

The /wiki/ is the Apache rewrite URL as this installation mimics the generic variation of re-writing. Change to whatever you use! Yes, hardcoding can be bad, but variables refused to work otherwise.

Usage

  • Once the extension is installed, the “⧼ElectronPdfService-download-label⧽” link in the MediaWiki sidebar will lead you to a new selection screen.
  • On the selection screen you can then choose whether you want to render your PDF using Electron (“Single Column”) or using the old OCG/LaTeX renderer (“Two Column”).
  • After you've chosen the desired rendering method, click the “⧼ElectronPdfService-download-button⧽” button to get the PDF.
  • Note: if there is no alternative rendering method available on the Wiki, “⧼ElectronPdfService-download-label⧽” will immediately serve you the Electron rendered PDF without showing a selection screen.

Links

See also

  • PDF export – summary of all PDF export extensions