On #ghostscript, Robin_Watts suggested using MuPDF for thumbnailing:
<Robin_Watts> mupdf is optimised for screen output, so may be a better bet for what you need. [10:02]
Version: unspecified
Severity: normal
URL: http://www.mupdf.com/
On #ghostscript, Robin_Watts suggested using MuPDF for thumbnailing:
<Robin_Watts> mupdf is optimised for screen output, so may be a better bet for what you need. [10:02]
Version: unspecified
Severity: normal
URL: http://www.mupdf.com/
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Pdfhandler: Switch from Ghostscript to MUPDF | mediawiki/extensions/PdfHandler | master | +7 -12 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T43371 Thumbnail/imagescaler (tracking) | |||
| Invalid | None | T43037 [DO NOT USE] PDF related bugs and enhancements (tracking) | |||
| Resolved | McZusatz | T25326 PDF image extraction fails | |||
| Resolved | None | T25652 Some elements missing from PDF thumbnails | |||
| Resolved | None | T38580 Fix PDF rendering by upgrading image scaler Ghostscript to 9.05+ | |||
| Open | None | T38594 Switch from GhostScript to MuPDF for thumbnailing PDFs |
For reference:
http://www.mupdf.com/ is a little light on info, but code is under AGPL license.
Default build appears to create a command-line app 'mudraw' as well as the GUI viewer:
$ ./build/debug/mudraw
usage: mudraw [options] input [pages]
-o - output filename (%d for page number)
-F - output format (if no -F, -o will be examined)
supported formats: pgm, ppm, pam, png, pbm, tga
-p - password
-r - resolution in dpi (default: 72)
-w - width (in pixels) (maximum width if -r is specified)
-h - height (in pixels) (maximum height if -r is specified)
-f - fit width and/or height exactly (ignore aspect)
-c - colorspace {mono,gray,grayalpha,rgb,rgba}
-b - number of bits of antialiasing (0 to 8)
-B - maximum bandheight (pgm, ppm, pam output only)
-g render in grayscale
-m show timing information
-M show memory use summary
-t show text (-tt for xml, -ttt for more verbose xml)
-x show display list
-d disable use of display list
-5 show md5 checksums
-R - rotate clockwise by given number of degrees
-G - gamma correct output
-I invert output
-l print outline
-j - Output mujstest file
-i ignore errors and continue with the next file
pages comma separated list of ranges
Sounds like it wouldn't be hard to support as a replacement or supplement to gs.
Iam trying solving it,basically it mean changing the value of "PdfProcessor" in extension .json and also in Localsettings.php the value of $wgPdfProcessor from gs to that of mupdf and changing the commands to be executed in the terminal by $cmd in PdfHandler_body.php has to be changed from gs to that of mupdf so that it executes the commands related to that of mupdf through which it displays the thumbnails in same pdf format using mupdf as it's dependency instead of Ghostscript Am I right please correct it it is?
Where is the address to the -sOutputFile=- is given as ings command no adress is given?
@Rammanojpotla: I unfortunately have problems to read and understand the last comments. What is "ings" in "is given as ings command no address"?
In general, using proper punctuation is very welcome to structure comments - this helps avoiding misunderstandings. Thanks!
Sorry for the mistake it is actually not "Ings" it is "in gs". The comment above is " in the command which ghostscript executes to render the images -sOutputFile=- gives the name to the rendered image hence so they are placed in /images/thumb directory but I could not get where the value of output file is given" can you say where actually the value the sOutputfile is given ?
@Aklapper if the patch has been submitted in gerrit then the documentation at https://www.mediawiki.org/wiki/Extension:PdfHandler would it be updated as that of mupdf?
Change 379573 had a related patch set uploaded (by Rammanojpotla; owner: Rammanoj):
[mediawiki/extensions/PdfHandler@master] Switched from GhostScript to MuPDF for thumbnailing PDFs
It's more than welcome to update documentation. :) (There is no need to ping me specifically, as other people can also answer such questions.)
can anyone say about the typos that could be updated for this issue I couldn't find them ?
@Rammanojpotla: I don't understand... Where were "typos" mentioned before? Please elaborate and see T38594#3617527 - thanks!
@Aklapper you have left a comment in gerrit page of the typos of dependency, So I asked if there are any ,are you referring to documentation page of extension pfhandler ?
If you refer to a comment on Gerrit you likely want to reply on Gerrit. So everybody involved can actually see the context. :)
can anyone review the patch it had been a long time since it had been submitted and no one reviewed it?