Go to any page with a graph. Press Download as PDF and open the file.
The PDF does not contain the Graph image.
Many graphs based on this page
Caused by: T242855: Undeploy graphoid
Go to any page with a graph. Press Download as PDF and open the file.
The PDF does not contain the Graph image.
Many graphs based on this page
Caused by: T242855: Undeploy graphoid
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T98698 PDF rendering does not include graph image, as the Graph extension does not support Graphoid anymore | |||
Resolved | Pietrasagh | T299642 Design a fallback image for Graphs |
Hi,
Good day.
I will be a lookout on this since I badly needed this feature on our project.
Thanks in advance.
Ace
As already announced in Tech News, OfflineContentGenerator (OCG) will not be used anymore after October 1st, 2017 on Wikimedia sites. OCG will be replaced by Electron. You can read more on mediawiki.org.
Still valid in the PDF stack in 2021 (Proton) on https://el.wikipedia.org/w/index.php?title=Ειδικό:DownloadAsPdf&page=Χρήστης%3AGeraki%2Fπρόχειρο&action=show-download-screen
Although this is a valid bug, it's not caused by Proton
The reason is that the Graph extension does not support Graphoid anymore, which means there isn't a tool to generate raster images for the graphs.
For security reasons Proton does not support rendering PDF with JavaScript enabled therefore it can't create a raster image from dynamic graphs.
IMO this became a feature request that's out of the scope of the current maintenance status.
Our PDF renderer is based on a web browser these days, so there's no particular reason Graph doesn't work any more. There is some load-on-demand code in Graph, so /maybe/ there's a remaining bug about ensuring that everything is loaded before the PDF is rendered.
I remember someone from services saying that we intentionally do not run javascript in the PDF rendering container, so it is expected.
as @TheDJ says - Proton - our PDF renderer disables the Javascript when rendering the page: https://github.com/wikimedia/mediawiki-services-chromium-render/blob/76161ba764e28e0f4f494d903d41d875a64481e6/lib/renderer.js#L157
Therefore if the page has any JS it's not gonna be executed. As the comment says, the Javascript was used to prevent lazyloading of images plus puppeteer was in a very early state when we started working on Proton - therefore the safest option was to entirely disable the Javascript as we didn't require it for a printable version of article.