From MediaWiki.org
< Reading‎ | Web
Jump to navigation Jump to search
This page is a translated version of the page Reading/Web/PDF Functionality and the translation is 50% complete.

Other languages:
বাংলা • ‎Deutsch • ‎English • ‎español • ‎français • ‎ગુજરાતી • ‎हिन्दी • ‎hrvatski • ‎italiano • ‎日本語 • ‎한국어 • ‎polski • ‎português • ‎português do Brasil • ‎tarandíne • ‎русский • ‎ไทย • ‎Tiếng Việt • ‎中文

Update on books, August 8 2018

Sample book from PediaPress

We have been working with PediaPress on generating and styling the new books. They have provided us with a sample of the current output, which will be very similar to the final version. We discussed points of improvement with the PediaPress team, which they are addressing currently. If you have any feedback or other comments on these samples, please let us know on the talk page.










  • 发布功能完备的单页生成器(打印到PDF)——2017年10月1日
  • 暂停图书PDF渲染——2017年10月1日
  • 彻底停用OCG渲染器——2017年10月1日
  • 发布完整功能的图书渲染器——2017年11~12月(基于研究结果计划发布的备选渲染系统)



In addition to this page being updated, this will be communicated in a banner on PDF creation page, in Tech News and on some Wikimedia mailing lists.



Additionally, it does not support a number of rendering requests from the community, the main one being the ability to render tables. We have selected a new service, the electron rendering service, as a suitable replacement. Our next step is to duplicate the functionality provided by OCG using the electron rendering service. Below, we will describe the main portions of the functionality we have identified as necessary. We would like to invite conversation around what is missing or what is superfluous in the provided list. We would also like to highlight over our future plans for PDF rendering to gather initial feedback.


The following table shows a sample of traffic to the Electron "Download as PDF" service for over a 6 hour period. The traffic is broken down by operating system (OS), browser, and the browser major version (e.g. Windows 7, Chrome v61.*).

Note well that the majority of our traffic appears to come from Windows based machines.

OS Browser Browser Major Version % of requests
Other Other - 14.38
Windows 7 Chrome 61 12.42
Windows 10 Chrome 61 8.83
Windows 7 IE 11 7.33
Windows 7 Firefox 56 6.59
Windows 10 Firefox 56 3.82
Windows 10 Edge 15 3.24
Windows 8.1 Chrome 61 3.07
Windows XP Chrome 49 2.2
Windows 10 Chrome 59 1.53
Windows 10 IE 11 1.51
Windows 8.1 Firefox 56 1.31
Windows XP Firefox 52 1.22
Windows 8 Chrome 61 1.15
Windows 8.1 IE 11 1.15
Mac OS X Safari 11 0.9
Windows 7 Firefox 53 0.89
Windows 7 Firefox 52 0.78
Ubuntu Firefox 56 0.78
Windows XP IE 6 0.7
Windows 7 Chrome 55 0.68
Windows 7 Firefox 55 0.62
Mac OS X Chrome 61 0.62
Android UC Browser 11 0.6
Windows 10 Edge 14 0.59
Windows 7 Opera 48 0.53
Android Chrome Mobile 61 0.49
Windows 10 Opera 48 0.44
Windows 7 Chrome 60 0.4
Windows Vista Chrome 49 0.39
Windows 7 Yandex Browser 17 0.37
Windows 10 Firefox 55 0.37
Mac OS X Safari 10 0.36
Windows 10 Chrome 50 0.34
Android Android 4 0.33
Mac OS X Firefox 56 0.33
Windows 10 Chrome 60 0.32
Windows 8.1 Chrome 43 0.3
Android Amazon Silk 60 0.29
Windows 7 Sogou Explorer 1 0.27
Windows 8 IE 10 0.26
Windows 7 IE 8 0.26
Windows 7 IE 9 0.25
Windows 8 Opera 12 0.25
Linux Firefox 52 0.25
Mac OS X Firefox 53 0.24
Windows 7 Firefox 45 0.24
Windows 10 Firefox 57 0.24
Windows 7 Firefox 38 0.22
Windows 10 Firefox 47 0.21

Current Functionality Requirements

The following is a list of the current requirements for PDF rendering for single-article PDF's and for books. The requirements different from the current implementation are displayed in bold.


  • Multiple issues with OCG are identified, including complaints from the community around OCG's inability to render tables.
  • Rendering of tables ranks as number 9 on the German-speaking Community Technical Wishlist.
  • Wikimedia Deutschland begins on working on a solution for rendering tables in PDF's, and introduces Electron. They do this planning to run it alongside OCG, not to replace it.
  • At the same time as Wikimedia Deutschland is working on the Electron service, the responsible maintainers of the OCG service at the Wikimedia Foundation come to the conclusion that OCG has to be replaced.
  • The WMF Reading Team takes over the responsibility for the long term maintenance of PDF rendering begins plans on implementing table rendering across all projects.
  • The Reading team launches a community consultation for gathering feedback on Electron.
  • The Reading Infrastructure and Web teams begin scoping the working necessary to port OCG functionality over to the Electron service.

Update After Consultation

Proposed PDF and print styles based on feedback from consultation

We launched a consultation on the current implementation of the PDF renderer in early June, 2017. After reviewing the consultation responses, we have made the following observations:

  • A larger number of users preferred the single-column format over the double column format
  • Users which prefered the double-column format highlighted that their preference was based in the styling and look and feel of double columns. Some users also expressed concerns with font size and wasting paper when printing PDF's in the single-column option
  • The following feature requests were made:
    • Functional hyperlinks
    • Date and url, 'this page downloaded [date] from [URL]'
    • Customizable css for layout, title, TOC
    • Option for 2 column format
    • Include/exclude images versions
    • Modifiable margins
    • print by section - allows you to remove references, paragraphs you don’t want, index, etc
    • allowing configurable text size

Based on the feedback, we have incorporated the following into our new print styles:

  • 超链接
  • 条目信息
  • smaller font and book-like styling

The remainder of the requests above will be postponed until the second iteration of the PDF renderer, in which we plan to build a settings mode that will allow for customization of the available options.



  • Individual articles will be rendered to PDF using the "Download as PDF" link in the sidebar
  • Multiple articles will be rendered to PDF using the Book Creator tool
  • All articles will contain attribution for text and images
  • All PDFs rendered will be able to print tables
    • Users will be able to customize the layout of their PDF (optional)


OCG 新服務 備註
署名 开放问题:新服务中的署名位置
样式 Latex 新样式
默认双栏布局 试验中 Default one column or two-column layout will be chosen based on feedback and quantitative and/or qualitative testing
輸出格式 PDF與純文字 僅限PDF


The new PDF styles will be designed for increased readability. Based on community feedback and qualitative or quantitative testing, support for a 2-column layout may be built for the book creator and/or for individual PDFs.

Development and Deployment Roadmap

The following is a rough outline of the development and deployment roadmap. It is subject to change.

  1. 2017年4~5月:
    1. The Reading team builds back-end support for functionality identified above
    2. Communities are consulted on expanding or shrinking proposed functionality
    3. Qualitative test performed for styling
  2. 2017年6~7月:
    1. New styles implemented
    2. First iteration is launched along with OCG on all projects and performance is compared
    3. Iterations based on consultations and identified edge cases
  3. 2017年8~9月:
    1. Additional changes made if necessary
  4. 2017年10月
    1. Second iteration launched without OCG on all projects

Single Articles

  • A PDF for a single article will be created by selecting the "Download as PDF" link
  • Upon selecting "Download as PDF", the PDF file will be generated. To download the file, users will select the "Download the file link"
  • Each PDF file will contain the following:
    • Article title and text
    • 資訊框 (如果有)
    • 表格s (如果有)
    • Single-column layout
    • 頁碼
    • All article images and captions
    • Links to pages linked from the article (blue links and external links)
    • Text and image sources, contributors, and licenses

Phabricator Tracking

All PDF-related changes including sunsetting OCG, replacing the Electron PDF renderer, and any updates to books or the collections extension are tracked under the phabricator project Proton. The project page will display any recent updates for all tasks related to PDFs.


Functionality available in October, 2017

Note: no changes will be made to the current book creator workflow at this time

  • User will launch the books creator by selecting "Create a book"
  • This will navigate to the current book creation page
  • To download a book, users will select the "download" link from the books page
  • Users may only download books in PDF format
  • Books will contain all elements from single article format as well as:
    • 圖書標題頁面
    • The references for each article from the book will appear at the end of the article
    • 每个条目将出现在新页面上
    • A single section for text and image sources, contributors, and licenses, that contains the collected contributions from all articles

Functionality available in November - December, 2017

  • Books will contain a table of contents with page numbers
    • Selecting a section from the table of contents will navigate the user to the corresponding section within the book

Styles for books will be updated for improved readability


There is an alternative way of exporting MediaWiki to LaTeX, PDF, ODT and EPUB:


The computational resources on the server are limited.

If you run Ubuntu Linux and want results faster, you can install the m2l-pyqt or mediawiki2latex packages.