Page MenuHomePhabricator

MediaWiki-extensions-PdfHandlerComponent
ActivePublic

Details

Description

Shows uploaded pdf files in a multipage preview layout (Homepage)

Recent Activity

Wed, Dec 3

Krinkle removed a project from T289228: Convert media handling code (PdfHandler, PagedTiffHandler) to use Shellbox: MediaWiki-Engineering.
Wed, Dec 3, 3:01 PM · Content-Transform-Team, MW-1.38-notes (1.38.0-wmf.7; 2021-11-02), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), MediaWiki-extensions-PdfHandler, MediaWiki-extensions-PagedTiffHandler, Shellbox, MW-on-K8s

Nov 16 2025

Pppery edited projects for T256959: Allow PDF's to be rendered at higher (or user specified DPI), added: Patch-Needs-Improvement; removed Patch-For-Review.
Nov 16 2025, 3:07 AM · Patch-Needs-Improvement, MediaWiki-extensions-PdfHandler, Thumbor Migration, Commons, All-and-every-Wikisource, Thumbor

Nov 13 2025

thcipriani moved T406888: TypeError: MediaWiki\Extension\PdfHandler\PdfHandler::pageCount(): Argument #1 ($image) must be of type MediaWiki\FileRepo\File\File, MediaWiki\FileRepo\File\ArchivedFile given, called in /srv/mediawiki/php-1.45.0-wmf.22/includ from Untriaged to Oct-Dec 2025 on the Wikimedia-production-error board.
Nov 13 2025, 4:27 PM · MediaWiki-extensions-PdfHandler, Wikimedia-production-error

Oct 28 2025

Ammarpad closed T406479: PDF preview partly broken? as Resolved.
Oct 28 2025, 11:14 AM · MediaWiki-extensions-PdfHandler, Commons
Ammarpad added a comment to T301291: PDF and Djvu files on Commons failed to be processed (no thumbnails, zero pages) but otherwise valid.

The listed pdf files seem to have been fixed now? Maybe the problem only remain for djvu files now.

Oct 28 2025, 11:13 AM · MediaWiki-extensions-PdfHandler, Commons
Ammarpad closed T297942: Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels as Resolved.

It seems there's not much to do here. The linked files seem to have been corrected in the meantime by whatever.

Oct 28 2025, 11:06 AM · MediaWiki-extensions-PdfHandler, Commons

Oct 9 2025

jnuche created T406888: TypeError: MediaWiki\Extension\PdfHandler\PdfHandler::pageCount(): Argument #1 ($image) must be of type MediaWiki\FileRepo\File\File, MediaWiki\FileRepo\File\ArchivedFile given, called in /srv/mediawiki/php-1.45.0-wmf.22/includ.
Oct 9 2025, 3:24 PM · MediaWiki-extensions-PdfHandler, Wikimedia-production-error
Romaine added a comment to T406479: PDF preview partly broken?.

Some kind of one-off error. Can be fixed with action=purge.

Oct 9 2025, 6:33 AM · MediaWiki-extensions-PdfHandler, Commons

Oct 6 2025

AntiCompositeNumber edited projects for T406479: PDF preview partly broken?, added: MediaWiki-extensions-PdfHandler; removed Thumbor.

This is a MediaWiki-extensions-PdfHandler issue, not Thumbor. It's likely related to T299521 and/or T381318.

Oct 6 2025, 1:57 PM · MediaWiki-extensions-PdfHandler, Commons

Aug 22 2025

gerritbot added a project to T402638: Improve transform command compatibility: Patch-For-Review.
Aug 22 2025, 12:16 PM · Patch-For-Review, MediaWiki-extensions-PdfHandler
gerritbot added a comment to T402638: Improve transform command compatibility.

Change #1181121 had a related patch set uploaded (by Huajing; author: Huajing):

[mediawiki/extensions/PdfHandler@REL1_43] Improve transform command compatibility

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

Aug 22 2025, 12:16 PM · Patch-For-Review, MediaWiki-extensions-PdfHandler
Huajing updated the task description for T402638: Improve transform command compatibility.
Aug 22 2025, 11:33 AM · Patch-For-Review, MediaWiki-extensions-PdfHandler
Huajing created T402638: Improve transform command compatibility.
Aug 22 2025, 11:32 AM · Patch-For-Review, MediaWiki-extensions-PdfHandler

Jun 29 2025

Ankry added a comment to T297942: Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels.
Jun 29 2025, 6:16 PM · MediaWiki-extensions-PdfHandler, Commons

Jun 25 2025

Yann added a comment to T297942: Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels.

Two more:
https://commons.wikimedia.org/wiki/File:Album_%C3%89tienne-Jules_Marey_CDF_13Fi3.pdf
https://commons.wikimedia.org/wiki/File:Jameson_-_Montesquieu_et_l%27esclavage.pdf

Jun 25 2025, 7:00 PM · MediaWiki-extensions-PdfHandler, Commons

May 11 2025

Ankry added a project to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct: All-and-every-Wikisource.
May 11 2025, 9:47 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler
Ankry added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

Can confirm:

  1. that the problem is present both at Commons and every local wiki
  2. ?action=purge on a local description page (e.g. Spanish Wikisource Archivo:Filename.pdf) solves the problem locally, but only after '?action=purge'ing the Commons description page.

i just tried this method on https://nl.wikisource.org/wiki/Bestand:Van_Maerlant,_Rijmbijbel_(Hs_10B21,_1332).pdf . doesnt seem to work.

May 11 2025, 9:37 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler
RoyZuo added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

Can confirm:

  1. that the problem is present both at Commons and every local wiki
  2. ?action=purge on a local description page (e.g. Spanish Wikisource Archivo:Filename.pdf) solves the problem locally, but only after '?action=purge'ing the Commons description page.
May 11 2025, 9:15 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler

May 6 2025

Aklapper added a comment to T382824: Cache problems with new Index pages in Wikisource.

@Jan.Kamenicek Ah. Increasing priority does not magically make bored developers appear (plus it does not need "WMF" programmers). Please see https://www.mediawiki.org/wiki/Bug_management/Development_prioritization - thanks.

May 6 2025, 12:06 PM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage
Jan.Kamenicek added a comment to T382824: Cache problems with new Index pages in Wikisource.

@Aklapper : I increased the priority because it is of high priority and because it urgently needs WMF programmers to start working on fixing this, half a year after the task was created.

May 6 2025, 11:38 AM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage
Aklapper raised the priority of T382824: Cache problems with new Index pages in Wikisource from High to Needs Triage.

@Jan.Kamenicek Do you plan to work on fixing this task, as you increased the priority of this task?

May 6 2025, 10:15 AM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage
Candalua added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

This issue (or something closely related) has been causing problems at Wikisource projects for a long time now. Basically, every single file that is uploaded for use at Wikisource has this issue, and needs to be purged after the upload. This is very confusing and frustrating for new and inexperienced users, because they just can't understand what is going wrong, and they don't know how to purge the file to solve the problem.
Please, is it possible to do something to solve this issue?
If purging the file solves the problem, is it possible, at least as a temporary measure, to just force an automatic purge after every upload of a PDF or Djvu file?

May 6 2025, 9:57 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler
Jan.Kamenicek triaged T382824: Cache problems with new Index pages in Wikisource as High priority.
May 6 2025, 9:37 AM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage
Jan.Kamenicek added a comment to T382824: Cache problems with new Index pages in Wikisource.

The problem is getting more and more urgent. While experienced editors know how to workaround it by purging caches of various affected pages, newbies get confused and frustrated, sometimes uploading duplicate files suffering the same problem, etc. Wikisource cannot afford losing new users, I do ask for solving this bug urgently.

May 6 2025, 9:36 AM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage

Jan 6 2025

tstarling closed T292322: Support large files in Shellbox, a subtask of T289228: Convert media handling code (PdfHandler, PagedTiffHandler) to use Shellbox, as Resolved.
Jan 6 2025, 5:06 AM · Content-Transform-Team, MW-1.38-notes (1.38.0-wmf.7; 2021-11-02), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), MediaWiki-extensions-PdfHandler, MediaWiki-extensions-PagedTiffHandler, Shellbox, MW-on-K8s

Jan 5 2025

Snaevar updated the task description for T382824: Cache problems with new Index pages in Wikisource.
Jan 5 2025, 12:35 AM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage

Jan 2 2025

AntiCompositeNumber removed a project from T382824: Cache problems with new Index pages in Wikisource: Thumbor.

https://commons.wikimedia.org/wiki/File:The_English_Reports_v2_1901.pdf was uploaded at 16:21 2 Jan 2025. It currently (17:20) shows 0 × 0 pixels, the file page displays a broken PDF icon, and the row in the image table (via the WMCS replicas) is

Jan 2 2025, 5:37 PM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage
AntiCompositeNumber added projects to T382824: Cache problems with new Index pages in Wikisource: MediaWiki-File-management, MediaWiki-extensions-PdfHandler.

Not a Thumbor issue as far as I'm aware, but a problem with how MediaWiki/PdfHandler generates and stores the file metadata. The thumbnails themselves are usually fine if you manually construct the URL.

Jan 2 2025, 5:12 PM · MediaWiki-extensions-PdfHandler, MediaWiki-File-management, Commons, ProofreadPage

Dec 20 2024

Soda renamed T381318: PDF pages don't have associated images on the Polish Wikisource from OpenSeadragon can't open a pdf file on Polish Wikisource to PDF pages don't have associated images on the Polish Wikisource.
Dec 20 2024, 4:36 PM · MediaWiki-extensions-PdfHandler, ProofreadPage
Wieralee added a comment to T381318: PDF pages don't have associated images on the Polish Wikisource.

Thanks for a help. But it doesn't solve the problem for the future.

Dec 20 2024, 4:09 PM · MediaWiki-extensions-PdfHandler, ProofreadPage
AntiCompositeNumber added a comment to T381318: PDF pages don't have associated images on the Polish Wikisource.

Purging the Commons file, waiting a moment, then purging the Index page fixed the issue. This is mentioned as a recurring issue at https://en.wikisource.org/wiki/Help:Index_pages#Parameters but doesn't have a Phabricator task associated with it.

Dec 20 2024, 3:48 PM · MediaWiki-extensions-PdfHandler, ProofreadPage
Wieralee reopened T381318: PDF pages don't have associated images on the Polish Wikisource as "Open".
Dec 20 2024, 2:07 PM · MediaWiki-extensions-PdfHandler, ProofreadPage
Wieralee added a comment to T381318: PDF pages don't have associated images on the Polish Wikisource.

Och... The same again :(
https://pl.wikisource.org/wiki/Indeks:Oscar_Wilde_-_Prawdziwy_przyjaciel_(opowiadania).pdf
https://commons.wikimedia.org/wiki/File:Oscar_Wilde_-_Prawdziwy_przyjaciel_(opowiadania).pdf

Dec 20 2024, 2:06 PM · MediaWiki-extensions-PdfHandler, ProofreadPage

Dec 4 2024

Uzume merged task T381318: PDF pages don't have associated images on the Polish Wikisource into T299754: ProofreadPage does not provide scans for files wich 0x0 size in metadata, despite of the size being set manually in the index.
Dec 4 2024, 6:12 PM · MediaWiki-extensions-PdfHandler, ProofreadPage
Uzume added a comment to T381318: PDF pages don't have associated images on the Polish Wikisource.

And the file page magically fixed itself too. Cool. I promise it was broken earlier.

Dec 4 2024, 6:01 PM · MediaWiki-extensions-PdfHandler, ProofreadPage
AntiCompositeNumber added a comment to T381318: PDF pages don't have associated images on the Polish Wikisource.

And the file page magically fixed itself too. Cool. I promise it was broken earlier.

Dec 4 2024, 1:26 AM · MediaWiki-extensions-PdfHandler, ProofreadPage
Uzume added a comment to T381318: PDF pages don't have associated images on the Polish Wikisource.

I do not see an issue when I browse to the URL listed in the description of this issue. It should be noted that the page does not currently exist but the editor and image on the right appear just fine if one clicks the "Utwórz" ("Create") link in the toolbar (for me in the upper right). One can additionally also see the appropriate image by selecting the "Grafika" ("Image") link from the toolbar (for me upper left). I personally have my UI set to English in global preferences but I provided link labels for Polish (uselang=pl) since that is likely the default UI language for most users of that site.

Dec 4 2024, 1:00 AM · MediaWiki-extensions-PdfHandler, ProofreadPage

Dec 3 2024

AntiCompositeNumber edited projects for T381318: PDF pages don't have associated images on the Polish Wikisource, added: MediaWiki-extensions-PdfHandler; removed Thumbor.

Source file is https://commons.wikimedia.org/wiki/File:Waldemar_Bonsels_-_Pszcz%C3%B3%C5%82ka_Maja_i_jej_przygody.pdf . I purged it and now it shows as 0x0px, which means MediaWiki treats it as corrupt. Thumbnailing works correctly with manually generated links though (see https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Waldemar_Bonsels_-_Pszcz%C3%B3%C5%82ka_Maja_i_jej_przygody.pdf/page101-345px-Waldemar_Bonsels_-_Pszcz%C3%B3%C5%82ka_Maja_i_jej_przygody.pdf.jpg for example), so untagging Thumbor and tagging PdfHandler.

Dec 3 2024, 8:44 PM · MediaWiki-extensions-PdfHandler, ProofreadPage

Sep 5 2024

tstarling changed the status of T292322: Support large files in Shellbox, a subtask of T289228: Convert media handling code (PdfHandler, PagedTiffHandler) to use Shellbox, from In Progress to Open.
Sep 5 2024, 11:11 PM · Content-Transform-Team, MW-1.38-notes (1.38.0-wmf.7; 2021-11-02), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), MediaWiki-extensions-PdfHandler, MediaWiki-extensions-PagedTiffHandler, Shellbox, MW-on-K8s

Aug 23 2024

tstarling changed the status of T292322: Support large files in Shellbox, a subtask of T289228: Convert media handling code (PdfHandler, PagedTiffHandler) to use Shellbox, from Open to In Progress.
Aug 23 2024, 5:48 AM · Content-Transform-Team, MW-1.38-notes (1.38.0-wmf.7; 2021-11-02), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), MediaWiki-extensions-PdfHandler, MediaWiki-extensions-PagedTiffHandler, Shellbox, MW-on-K8s

Jul 1 2024

Pppery removed a project from T297942: Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels: Wikimedia-maintenance-script-run.

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

Jul 1 2024, 10:23 PM · MediaWiki-extensions-PdfHandler, Commons

Jun 4 2024

TheDJ updated the task description for T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.
Jun 4 2024, 2:17 PM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler

Jun 3 2024

TheDJ added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/mediawiki/thumb.php on line 362

This "something" could be anything, including datacenters being out of sync, JobQueue jobs timing out, DB queries timing out, pathological data that makes Ghostscript spit out something the PDF handler doesn't handle.

Jun 3 2024, 9:11 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler
Xover added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/mediawiki/thumb.php on line 362

Jun 3 2024, 9:04 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler
Loman87 added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

I don't know if this could add something to the discussion, anyway on my mw installation (MediaWiki 1.40.0; PHP 8.3.7 (apache2handler); ICU 70.1 ; MariaDB 10.11.8) I am having the same issue. If I try to generate the thumbs of a pdf via script, I get this:
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/mediawiki/thumb.php on line 362

Jun 3 2024, 8:19 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler

May 24 2024

vitaly-zdanevich added a comment to T297942: Specific PDF on Commons has no image thumbnails, dimensions shown as 0x0 pixels.

I have the same problem for many my files, for example https://commons.wikimedia.org/wiki/File:%D0%9C%D0%95%D0%92_1883-07.pdf

May 24 2024, 12:20 AM · MediaWiki-extensions-PdfHandler, Commons

Apr 15 2024

Xover added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

The patch should make any errors more verbose so that we can collect more information about these failures.

Apr 15 2024, 9:18 AM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler

Mar 30 2024

Maintenance_bot removed a project from T164045: PDF thumbnails fail to render on newly-uploaded PDF files: Patch-For-Review.
Mar 30 2024, 4:30 AM · WMF-General-or-Unknown, Regression, MediaWiki-extensions-PdfHandler, Multimedia, MediaWiki-File-management, All-and-every-Wikisource, Commons

Mar 29 2024

Ninovolador added a comment to T299521: PDF file has 0x0 image size in Commons after uploading a new version while the page number is correct.

Can confirm:

  1. that the problem is present both at Commons and every local wiki
  2. ?action=purge on a local description page (e.g. Spanish Wikisource Archivo:Filename.pdf) solves the problem locally, but only after '?action=purge'ing the Commons description page.
Mar 29 2024, 2:27 PM · All-and-every-Wikisource, MW-1.42-notes (1.42.0-wmf.23; 2024-03-19), MediaWiki-extensions-PdfHandler

Mar 28 2024

cscott moved T289228: Convert media handling code (PdfHandler, PagedTiffHandler) to use Shellbox from Backlog to Tracking on the Content-Transform-Team board.
Mar 28 2024, 2:21 PM · Content-Transform-Team, MW-1.38-notes (1.38.0-wmf.7; 2021-11-02), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), MediaWiki-extensions-PdfHandler, MediaWiki-extensions-PagedTiffHandler, Shellbox, MW-on-K8s