Page MenuHomePhabricator

Handle scrollable references when generating PDFs
Open, LowPublic

Description

**This limitation has been recorded in https://www.mediawiki.org/wiki/Reading/Web/Projects/Print_Styles#Limitations**

When an article has scrollable references section (example: https://ar.wikipedia.org/wiki/%D9%82%D9%86%D8%A7%D8%A9_%D8%A7%D9%84%D8%B3%D9%88%D9%8A%D8%B3) the printed version looks very bad. The main cause is that references sections are wrapped with an element with inline max-height: 300px, overflow: auto styles.

Both the PDF renderer and browser print are affected.
We cannot do too much in that case as those styles are this is done by <div class="reflist4" style="max-height: 300px; overflow: auto; padding:12px"> added by the editor.

Close up:

Developer notes

This is a local wiki issue and can only be fixed by the community. Arabuc Wiki do not use any templates for reflist. If they did they could make use of TemplateStyles and make use of a media query to limit these styles to "screen" e.g. not "print" media

@media screen {
 .reflist {
    height: 300px; overflow: auto; padding:12px
  }
}
Other possible solutions
  1. add a javascript that runs before page.printToPDF() that goes through content children and removes max-heigh and overflow styles.

Event Timeline

pmiazga created this task.Jun 12 2018, 7:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 12 2018, 7:34 PM
pmiazga triaged this task as Low priority.Jun 12 2018, 8:09 PM
Vvjjkkii renamed this task from Handle scrollable references when generating PDFs to 75aaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from 75aaaaaaaa to Handle scrollable references when generating PDFs.Jul 2 2018, 9:32 AM
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Jdlrobson moved this task from Upcoming to Needs Analysis on the Readers-Web-Backlog board.
Jdlrobson updated the task description. (Show Details)Aug 16 2018, 9:48 PM
ovasileva moved this task from Triage to Tracking on the Proton board.Feb 22 2019, 3:26 PM