**Background** - we would like to investigate replicating some or most of OCG's functionality using the Electron PDF service. Namely, we would like the ability to concatenate articles and allow transformations which direct the look and feel of Electron.
**Acceptance Criteria**
Determine the best way to set up the back end for rendering concatenated PDF's according to the following requirements:
- PDF generation must be triggered from the book creator and from download as PDF links (we must be able to generate PDF's for single and multiple articles)
- For multiple articles (books), the current UI of the book creator will be used
- Users will be able to select between a two-column and single-column layout, where the two-column layout will render using OCG and the single column layout will render using electron. This must be available for both books and individual articles (similar to current implementation on mediawiki (https://www.mediawiki.org/w/index.php?title=Special:ElectronPdf&page=MediaWiki&action=show-selection-screen&coll-download-url=%2Fw%2Findex.php%3Ftitle%3DSpecial%3ABook%26bookcmd%3Drender_article%26arttitle%3DMediaWiki%26returnto%3DMediaWiki%26oldid%3D2301969%26writer%3Drdf2latex)
- Concatenated PDFs must include the following:
-- Table of contents
--- Table of contents must contain the individual table of contents for each article as subsections
--- Table of contents must be clickable - selecting a link from the table of contents must navigate to the correct position within the article
-- All tables and infoboxes available in the original articles
-- Chapter structure - each article must be numbered as a chapter and marked accordingly in the table of contents
-- References
--- References will appear individually at the end of each article. If links are available within the references, they will be available within the created PDF
-- Blue links - all blue links will be available within the PDF. Blue links will be styled differently
-- Styles - styles must contain the current desktop print styles (in progress here: {T135022})
-- Contributions:
--- all text contributors - a section for contributions will appear at the end of each book. The list of contributors will be separated by the name of the article
--- all image contributors - a section for image contributions will appear at the end of each book. The list of contributors will be separated by the name of the article
-- Content license
Example Structure:
Book title (page break)
Table of contents (page break)
Chapter 1, Article Title, article 1, article 1 references (page break)
Chapter 2, Article Title, article 2, article 2 references (page break)
Text and image sources, contributors, and licenses
- Section 1: text sources
-- Section 1.1: text sources article 1,
-- Section 1.2: text sources article 2
- Section 2: image sources
-- Section 1.1: image sources article 1
-- Section 1.2: image sources article 2
- Section 3: content license
= Questions to answer
>>! In T163272#3207989, @bmansurov wrote:
> To summarize, we need to find a way to make transformations to HTML/wikitext before rendering a PDF. The requirements for the transformations are listed in the acceptance criterion "Concatenated PDFs must include the following:" and it's sub-bullets.