Reading/Web/PDF Functionality/zh

Please read the plans for the PDF service below and tell us on the discussion page if we are missing anything, or if there's anything that we plan to work on that is actually unnecessary.

介紹
我們目前的PDF渲染服務，離線內容產生器不再維護. 簡單的講，它已經过期了. 它原本由第三方建立架構，而目前仍在運行老舊的程式代碼，而這在今後可能導致安全漏洞及其他大規模問題. 如果我們仍然需要PDF功能，遺憾的講，我們將不得不替換它，或者我們突然找到一種不需要計劃什麼，甚至不需要這種功能的解決方案.

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.

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) 2017年4~5月：
 * 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) 2017年6~7月：
 * 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) 2017年8~9月：
 * 10) Additional changes made if necessary
 * 11) 2017年10月
 * 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
 * 資訊框（如果有）
 * 表格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

Books
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:
 * 圖書標題頁面
 * 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
 * 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