Reading/Web/PDF Functionality/ja

2017年9月更新
Our current PDF rendering service, the offline content generator (OCG), is no longer maintainable. Simply put, it's breaking down. The Reading team at the Wikimedia Foundation has been working towards replacing it for months. Originally created by a third party, OCG has been running on outdated code which may introduce security vulnerabilities and other major issues in the future. Over the last three months, we’ve had banners on the PDF creation page asking for feedback on the prototype for our new renderer. The new renderer will have improved capabilities from OCG – it will be able to print tables and infoboxes and will contain styling focused on better readability. We've gathered a lot of good feedback on the prototype and are working on making the required updates to our new PDFs.

補遺：PDFブック生成は短期的に無効に
Unfortunately, major issues with our old renderer (OCG) will require us to remove it as a rendering option prior to completing the necessary updates for the books feature. This is earlier than we wanted. By the time we remove OCG, the work for rendering of single articles will be completed. However, the rendering of books will be paused while we evaluate and complete the necessary work. Our initial choice of renderer for the replacement, the Electron rendering service, is not capable of supporting PDFs of larger sizes and fails when attempting to render a book with multiple articles. We will be working to select a new rendering system for books which can handle the size of the files and support our requirements. This is not how we planned to do this. We never aimed to temporarily remove the book PDF functionality.

日程表
 * 記事単位でレンダーする機能完全版の公開（PDF形式で出力） – 2017年10月1日
 * ブックのPDF 生成を一時停止 – 2017年10月1日
 * OCG レンダラーの廃止期日を告知 – 2017年10月1日
 * 機能完全版のブックレンダラーの公開 – 2017年11月–12月（暫定的. 代替のレンダリングのシステム研究の結果待ち）

機能

For a full list of current and upcoming functionality, see below.

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.

はじめに
Our current PDF rendering service, the offline content generator, is no-longer maintainable. Simply put, it's breaking down. Originally created by a third party, it currently runs on outdated code which may introduce security vulnerabilities and other major issues in the future. If we're to have the PDF functionality, we unfortunately have to replace it, or we might suddenly find ourselves in a situation where we'd have to take it down without having planned to do so.

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.

History

 * Rendering PDF articles and books 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.
 * 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.

協議を経た更新
現行のPDFレンダラーの実装に関して2017年7月初旬に協議を始めました. その反応の評価を経て以下の考察を行なっています.
 * 記事の配置は2段組より1段がよいというユーザーが上回る
 * 記事の2段組を好むユーザーによると、好きな理由は書式とルックアンドフィール（デザイン）だと強調する. 人により、PDF印刷で1段組を選ぶとフォントの大きさや紙の無駄づかいが気がかり
 * 要望のあった機能
 * 機能的なハイパーリンク
 * 日付とURLの表示. 「このページは[URL]から[date]付でダウンロード」
 * レイアウトや題名、作成年月日のCSS（スタイル）をカスタマイズできる
 * 2列表示のオプション
 * 画像の表示/非表示を選べる
 * マージンの調整
 * 節単位の印刷ー脚注や不用な段落、目次の削除が可能
 * テキストの大きさを設定できる

コミュニティからのフィードバックを受け、印刷書式に以下を取り入れました.
 * ハイパーリンク
 * 記事の詳細
 * フォントは小さめで書籍に似た書式

上記の要望で未対応のものはPDFレンダラー第2版まで延期し、利用できるオプションをカスタマイズする設定を構築する予定です.

Proposal
The following is a proposal for the scope of functionality necessary for PDF rendering:
 * 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 PDF's rendered will be able to print tables
 * Users will be able to customize the layout of their PDF (optional)

Design
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) April – May 2017:
 * 2) The Reading team builds back-end support for functionality identified above
 * 3) Communities are consulted on expanding or shrinking proposed functionality
 * 4) Qualitative test performed for styling
 * 5) June – July 2017:
 * 6) New styles implemented
 * 7) First iteration is launched along with OCG on all projects and performance is compared
 * 8) Iterations based on consultations and identified edge cases
 * 9) August 2017 – September 2017
 * 10) Additional changes made if necessary
 * 11) October 2017
 * 12) Second iteration launched without OCG on all projects

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.

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
 * Infobox(if any)
 * Tables (if any)
 * Single-column layout
 * Page number
 * All article images and captions
 * Links to pages linked from the article (blue links and external links)
 * Text and image sources, contributors, and licenses

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:
 * Book title page
 * The references for each article from the book will appear at the end of the article
 * Each article will begin on a new page
 * 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
Styles for books will be updated for improved readability __INDEX__ __NEWSECTIONLINK__
 * 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