bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#72193: 31.0.50; DocView on Postscript with SVG support


From: Eli Zaretskii
Subject: bug#72193: 31.0.50; DocView on Postscript with SVG support
Date: Sat, 20 Jul 2024 10:14:21 +0300

> Date: Fri, 19 Jul 2024 14:30:54 +0200
> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> DocView seems to do the wrong thing on a Postscript file when there is
> support for SVG in Emacs.  I also have "gs" and "mutool" installed.
> 
> How to reproduce:
>     - emacs -Q
>     - C-x C-f "existing-document.ps"
>     - C-c C-c -> no images displayed
> 
> Looking for pages into the cache with `doc-view-dired-cache', it seems
> that DocView has produced PNG content into files with "svg" extension.
> Emacs then tries to display SVG images with PNG content and, obviously,
> failed.
> 
> The following patch fixes the issue for me but maybe there is more than
> meets the eye:
> 
> diff --git a/lisp/doc-view.el b/lisp/doc-view.el
> index f96b1bad886..e3539f8f886 100644
> --- a/lisp/doc-view.el
> +++ b/lisp/doc-view.el
> @@ -2151,6 +2151,7 @@ doc-view-set-up-single-converter
>    (pcase-let ((`(,conv-function ,type ,extension)
>                 (pcase doc-view-doc-type
>                   ('djvu (list #'doc-view-djvu->tiff-converter-ddjvu 'tiff 
> "tif"))
> +                 ((or 'ps 'postscript 'eps) (list 
> #'doc-view-ps->png-converter-ghostscript 'png "png"))
>                   (_ (if (and (eq doc-view-pdf->png-converter-function
>                                   #'doc-view-pdf->png-converter-mupdf)
>                               doc-view-mupdf-use-svg)

Tassilo, any comments or suggestions?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]