Directory

⚓ T297942 Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels
Page MenuHomePhabricator

Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels
Open, Needs TriagePublic

Description

Hi, There is a problem with this PDF file: https://commons.wikimedia.org/wiki/File:Guinault_-_Sergent_!_(1881).pdf
Thumbnails don't display, and it says 0.00 Megapixel.
However the file seems to be functional.

Event Timeline

@Yann: Hi,where does something say 0.00 Megapixel somewhere? Please follow https://www.mediawiki.org/wiki/How_to_report_a_bug and use the bug report form for bug reports (it is linked at the top).

Aklapper renamed this task from PDF without thumbnails: 0.00 Megapixel to Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels.Dec 17 2021, 11:47 AM

This reminded me a bit of T286273 but that one is about a PNG file instead.

@Yann: Hi,where does something say 0.00 Megapixel somewhere? Please follow https://www.mediawiki.org/wiki/How_to_report_a_bug and use the bug report form for bug reports (it is linked at the top).

I think this is done by a gadget, which calculate the size. Here 0 x 0 =0.

Hello,

I occur the same issue with this PDF : https://commons.wikimedia.org/wiki/File:L%E2%80%99Aclot.pdf, wich has a dimension 0 × 0 on Commons, but recognized correctly (1 237 × 1 750) on wa.wikisource https://wa.wikisource.org/wiki/File:L’Aclot.pdf

The strangest thing is that the version of December 9 at 9:06 pm was displayed with a dimension 0 × 0 (as summarized in the next version at 9:54 pm), but now this version is shown with the real dimension 1 237 × 1 750.

L’Aclot (Commons vs Wikisource).png (2×2 px, 1 MB)

I went through all PDF and Djvu files on Commons and made a list of those which are valid, but are shown as 0x0 without thumbnails, the list is here: T301291

This comment was removed by Stang.

One more https://commons.wikimedia.org/wiki/File:The_Century_Dictionary_and_Cyclopedia%2C_vol._2_(cu31924091890594).pdf 2nd version

I even got a "crash"

Request from 90.112.34.87 via cp6012 cp6012, Varnish XID 92742326
Error: 503, Backend fetch failed at Tue, 06 Jun 2023 10:59:01 GMT

If code crashes then the code should be made more robust not to crash.

The problem seems to be not only PDF related. This djvu file shows the same effect:
https://commons.wikimedia.org/wiki/File:PL_JI_Kraszewski_Zygzaki.djvu
As a workaround, we uploaded the file directly to Wikisource:
https://pl.wikisource.org/wiki/Plik:PL_JI_Kraszewski_Zygzaki.djvu
It works. But should we stop using Commons?

Maybe RefreshImageMetadata.php on PL_JI_Kraszewski_Zygzaki.djvu would help?

RhinosF1 subscribed.

Maybe RefreshImageMetadata.php on PL_JI_Kraszewski_Zygzaki.djvu would help?

11:04:05 <@Urbanecm> RhinosF1: wargo: i tired, it did not help. however, manually constructing the URL where the thumbnail is supposed to be (https://upload.wikimedia.org/wikipedia/commons/thumb/archive/8/82/20230929224435%21PL_JI_Kraszewski_Zygzaki.djvu/page1-87px-PL_JI_Kraszewski_Zygzaki.djvu.jpg) appears to have worked

I think helped the first solution...

Pppery subscribed.

Removing Wikimedia-maintenance-script-run as there doesn't appear to be an active request to run a maintenance script here after T297942#9668734