Page MenuHomePhabricator

Download as PDF feature is producing tiny font sizes
Closed, ResolvedPublic

Description

It appears that the print styles on English Wikipedia (as far as I have tested) are producing smaller font sizes than other wikis (German and MediaWiki.org tested) when printed from desktop. If I recall correctly they should be consistent across projects at this point?

"Wiki" article from English Wikipedia

English Wiki article.png (984×902 px, 340 KB)

"Wiki" article from German Wikipedia

de Wiki article.png (1×901 px, 435 KB)

First reported: https://www.mediawiki.org/wiki/Topic:U5nbeixaqf4cgo8t

Event Timeline

This is the same problem as T175005
The wiki article has a large table (MediaWiki syntax) which is not present on dewiki. As demonstrated by this change editors can strip large tables from print mode to make printing more optimum. The more I look at this issue the more I feel like it's an editor issue.. if only the wikitext/visual editor could inform editors of content that's too big to display on print ... 🤔

TheDJ subscribed.

This is not actually the exact same problem. The problem is being aggravated here, by the fact that the print style and the skin have differing style definitions for <pre>

Vector uses pre with white-space: pre-wrap;
where
print uses pre with white-space: pre;

This forces the cells to be wider during print, causing the table to be wider. Compare the original, with my version, where i used the inspector to assign pre-wrap to the print styles.

Screen Shot 2018-02-01 at 14.17.33.png (1×1 px, 467 KB)
Screen Shot 2018-02-01 at 14.17.27.png (1×1 px, 565 KB)

TheDJ triaged this task as Low priority.Feb 1 2018, 1:22 PM
TheDJ added a project: CSS.
TheDJ added a project: good first task.

Change 407638 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/core@master] Print: pre-wrap <pre> elements

https://gerrit.wikimedia.org/r/407638

Change 407638 merged by jenkins-bot:
[mediawiki/core@master] Print: pre-wrap <pre> elements

https://gerrit.wikimedia.org/r/407638

TheDJ claimed this task.
TheDJ removed a project: Patch-For-Review.