Page MenuHomePhabricator

Thumbnails for specific PDF file rendered half of their proper width on File: page (thumbnail file itself is correct)
Open, Needs TriagePublic

Description

The file with this issue:
https://commons.wikimedia.org/wiki/File:Current_Intelligence_Bulletin_63_-_Occupational_Exposure_to_Titanium_Dioxide.pdf

The thumbnails of the first and last pages are distorted—they are squished to half their proper width. The PDF files themselves, and the thumbnails for all the other pages, seem to be fine. (Reported on Commons COM:GL/ILL by John P. Sadowski (NIOSH))


See Also: T72734

Event Timeline

Perhelion created this task.Jun 8 2017, 2:03 PM
Restricted Application added projects: Social-Tools, Commons. · View Herald TranscriptJun 8 2017, 2:03 PM
SamanthaNguyen added a subscriber: SamanthaNguyen.

@Perhelion: Comments is an extension for registering <comments> as a parser tag and is unrelated to this (Social-Tools also just covers social extensions, which Comments falls under). Thus I'm removing both of those and adding the MediaWiki-extensions-PdfHandler project tag.

Aklapper renamed this task from Thumbnails for specific PDF file (on Commons) renders ugly to Thumbnails for specific PDF file (on Commons) rendered half of their proper width.Jun 8 2017, 3:31 PM
Aklapper updated the task description. (Show Details)
Perhelion renamed this task from Thumbnails for specific PDF file (on Commons) rendered half of their proper width to Thumbnails for specific PDF file rendered half of their proper width.Jan 30 2018, 10:39 PM
Gilles added a subscriber: Gilles.Mar 14 2018, 10:19 AM

This isn't an issue with thumbnailing, but a problem with the layout of the file page for PDFs when dealing with PDFs whose page aspect ratio changes from page to page, and is different from what Mediawiki considers to be the "default" aspect ratio for that PDF.

You can see that the thumbnail that appears distorted on the page actually renders with the right aspect ratio when you open it directly: https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Current_Intelligence_Bulletin_63_-_Occupational_Exposure_to_Titanium_Dioxide.pdf/page1-463px-Current_Intelligence_Bulletin_63_-_Occupational_Exposure_to_Titanium_Dioxide.pdf.jpg

Mediawiki forces specific width and height on the <img> element on the file page that doesn't match the aspect ratio of those particular pages.

Aklapper renamed this task from Thumbnails for specific PDF file rendered half of their proper width to Thumbnails for specific PDF file rendered half of their proper width on File: page (thumbnail file itself is correct).Apr 8 2019, 11:11 AM
Aklapper edited projects, added MediaWiki-File-management; removed media-storage.
Restricted Application added a project: Multimedia. · View Herald TranscriptApr 8 2019, 11:11 AM