Reading/Web/PDF Functionality/ja

2017年9月更新
現行のPDFレンダリング・サービスoffline content generator (OCG) は既に保守ができない状態です. 破損したと断言できます. ウィキメディア財団の閲覧チーム では代替のために数ヶ月前から取り組んできました. OCGはサードパーティの開発から始まり旧式のコードで運用することから、将来的にセキュリティの脆弱性及びその他の深刻な問題をもたらす可能性が懸念されます. この3ヵ月にわたりPDF作成ページにバナーを掲示して、新しいレンダラーのプロトタイプへのfeedback（フィードバック）を募集しました. OCGと比べると、新しいレンダラーは機能を改善します. 表組やインフォボックスを含めて印刷でき、読みやすさを重視した書式を備える予定です. プロトタイプには多くのフィードバックが寄せられ、新しいPDFに必要な更新に取り組み中です.

補遺：PDFブック生成は短期的に無効に
残念ながら、旧来のレンダラー (OCG) はブック形式の機能を完成させる以前に、レンダリングのオプションから削除しなければなりません. OCG 削除の実行までには記事単位のレンダラーは完成する見込みです. ところがブック形式の生成機能は、必要な作業を評価し完成するまで中断します. 当初は代替のレンダラーとして Electron レンダリング・サービスを検討したものの、重いPDFに対応不可能であり、複数の記事をブック形式にまとめようとすると失敗してしまいます. サイズが大きくても、私たちが求める条件を満たすブック形式に対応する新しいレンダリング・システムを決定するため努力を続けます. これは予定外の道のりであり、PDF機能の短期的な削除はまったくの想定外でした.

日程表
 * 記事単位でレンダーする機能完全版の公開（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