Last modified: 2012-10-24 19:22:24 UTC
Hi, I've skipped 1.18 - so I'm not sure if it was working or not with this release. On MW 1.19 PdfHandler does not generates thumbnail with generic error code 1 ("GPL Ghostscript 9.05: Unrecoverable error, exit code 1"). It seems like GS does not get proper file name to convert, since it's URL file format. For example: mwstore://local-backend/local-public/9/9f/FreeLoaderManual-ocr.pdf Changing this code fixes problem (I haven't seen in MW 1.19 any information about changes in file api) --- PdfHandler_body.php 2012-06-15 18:50:21.574756245 +0200 +++ PdfHandler_body.php-orig 2012-06-15 18:50:04.247514269 +0200 @@ -103,8 +103,7 @@ $width = $params['width']; $height = $params['height']; - $srcPath = $image->getLocalRefPath(); + $srcPath = $image->getPath(); $page = $params['page']; if ( $page > $this->pageCount( $image ) ) { Cheers! Adrian
I also get this error using 1-19 but can confirm it worked in 1-18. details in my case are; • Error creating thumbnail: GPL Ghostscript 9.05: Unrecoverable error, exit code 1 convert: no decode delegate for this image format `/tmp/magick-XXBtkyN5' @ constitute.c/ReadImage/503. convert: missing an image filename `/tmp/transform_5454eaa-1.jpg' @ convert.c/ConvertImageCommand/2822. Regards Roger Appleby
> --- PdfHandler_body.php 2012-06-15 18:50:21.574756245 +0200 > +++ PdfHandler_body.php-orig 2012-06-15 18:50:04.247514269 +0200 > @@ -103,8 +103,7 @@ > > $width = $params['width']; > $height = $params['height']; > - $srcPath = $image->getLocalRefPath(); > + $srcPath = $image->getPath(); > $page = $params['page']; > > if ( $page > $this->pageCount( $image ) ) { > > Cheers! Adrian I've just saw my mistake ;) - patch should be other way around --- PdfHandler_body.php 2012-06-15 18:50:21.574756245 +0200 +++ PdfHandler_body.php-orig 2012-06-15 18:50:04.247514269 +0200 @@ -103,8 +103,7 @@ $width = $params['width']; $height = $params['height']; - $srcPath = $image->getPath(); + $srcPath = $image->getLocalRefPath(); $page = $params['page']; if ( $page > $this->pageCount( $image ) ) {
Just made the change and it works fine. Thanks Roger A
This was fixed by https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/PdfHandler.git;a=commitdiff;h=da2c37465ff61035c37c9f5c35bb66eaef093a8e;hp=d999b09e729effe226ee44996c7ca5101e31eaed , but thanks for your report.
Thank you Bugzilla for garbling my comment. Sigh. Next try with fake spaces: https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/PdfHandler.git;a=patch; h=da2c37465ff61035c37c9f5c35bb66eaef093a8e; hp=d999b09e729effe226ee44996c7ca5101e31eaed