Topic on Talk:Reading/Web/PDF Functionality/Flow

Jc86035 (talkcontribs)
  • Images are shown at far too low a resolution for print documents (should have maybe doubled or quadrupled resolution).
  • Sometimes not all the images are downloaded and the page has to be reloaded and purged for the PDF to be rendered properly.
  • There is extremely weird spacing and kerning for me; maybe this is because the documents aren't actually supposed to be rendered with the Liberation fonts. References being floated on top of text, characters being given zero(?) width, and so on. I am using macOS 10.13 but downloaded the Liberation fonts separately.
  • The hlist class should not be rendered smaller than other text because it is frequently used next to non-hlist text in infoboxes and templates. Most of the use cases for making it smaller (navboxes and sidebars) are hidden from PDF downloads anyway so it is not necessary here IMO.
  • On some template pages with no text and a floated table (e.g. RDTs), the licensing text appears next to the rest of the content and there appear to be two thick black horizontal lines below the header. Is this deliberate?
TheDJ (talkcontribs)

Can you please link to examples and per case specify if it was a 'download as PDF' or normal print ?

Jc86035 (talkcontribs)

@TheDJ All of these were from "download as PDF". Regular "printable version" was not changed along with the move to Electron, AFAIK.

  • The first two were on w:en:Template:Tsuen Wan Line RDT but any page with pictures would do (although it might be difficult to reproduce the image placeholder). All images are clearly pixelated, but this is particularly bad with BSicons since the details are very fine to begin with and some of them were not drawn to match the 20×20 grid (but some match the 40×40 grid better). (Naturally with SVGs using the original SVG instead of a PNG would be better, but this would be problematic because librsvg renders them differently to basically everything else, so errors would pop up in some files.)
  • The third and fourth were on w:en:Songs About Jane. The third is on every page (it appears in the licensing text), and the fourth is on many musical album articles.
  • The fifth seems to have been fixed in the meantime but would have appeared on w:en:Template:Political corruption sidebar.

In addition, I was inexplicably unable to download w:en:Special:ElectronPdf/Songs About Jane for at least five minutes (it never completed) but downloaded it through Tor in about half a minute. This was also the case for every other page I tested today; maybe this is my ISP or the WMF's servers in the Asia region.

Another issue is that there are thin white lines between the images in the RDT, which usually shouldn't happen. This is probably because the rounding on the image transform functions is a bit off (though I might be wrong since I'm looking at the PDF file through Inkscape, which converted it to an SVG).

If Phabricator bugs are filed I will upload images there.

TheDJ (talkcontribs)

> Regular "printable version" was not changed along with the move to Electron, AFAIK.

It was, it got new styling as well, as announced on the village pumps.

  • image resolution: I think this is dpi mismatch between image and print.. We should probably check if dpi is set correctly, and if it is perhaps possible to get the higher res retina versions of images. And indeed using the SVG version for should be looked into (but that's not an new issue). Not sure if this is due to the new styling, or due to electron
  • That's a serious problem... Maybe it has to do with the image fallback chain... Likely an Electron problem.
  • I can definitely reproduce the kerning issues: https://phabricator.wikimedia.org/F10309467 I don't remember this in the old stylesheets+electron, so presume it has something to do with the font selection now being different after the new styles. We might be missing a font (or font variant) on the rendering server.
  • Are you referring to the size of the dot here ????
  • The fifth I fixed locally on en.wp already and should come to other other wikis in the future.

The white lines.. is probably hard to fix. I think it's a subpixel rendering problem of the PDF engine of Electron...

Jc86035 (talkcontribs)

I believe the print styling for enwiki was actually mostly changed in July, but I don't think it was announced until last month or so. Not a lot of bugs popped up, aside from some spacing errors in RDTs (I think).

  • For the fourth: No, the size of the text (in the track listing). The hlist text is slightly smaller than the regular text, which doesn't look very good since {{hlist}} was omitted for the single-item cells.
TheDJ (talkcontribs)

A found it. Due to '.vector-experimental-print-styles ul li' changing the font sizes for lists, which does not account for hlist being an inline list.. Seems a bit dangerous rule in general, as li is also used for galleries and a few other things... If need be, we can fix it specifically for en.wp (as hlist is en.wp specific). But hm... not sure what's the best course here....

Jc86035 (talkcontribs)

Is hlist enwiki-only? FWIW there's a liste-horizontale on frwiki which seems to do roughly the same thing (and there are always cases of templates and probably CSS classes being mass-exported to other wikis). I think you could plausibly get away with making the text smaller only if the list isn't inside a table or div, but I'm not sure what side effects there would be. Alternately you could apply the rule only to "galleries and a few other things" and not to other lists.

TheDJ (talkcontribs)
Reply to "Problems"