From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Eli Zaretskii <eliz@gnu.org>,
60308@debbugs.gnu.org, yantar92@posteo.net,
Gregory Heytings <gregory@heytings.org>,
bugs@gnu.support
Subject: bug#60308: 30.0.50; Can't read some PDF files any more
Date: Sat, 07 Jan 2023 16:48:22 +0100 [thread overview]
Message-ID: <87pmbqfird.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <87o7rbtn45.fsf@gmx.net> (Stephen Berman's message of "Fri, 06 Jan 2023 21:38:18 +0100")
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Stephen Berman <stephen.berman@gmx.net> writes:
[...]
> FTR, I just updated my mupdf to 1.21.1 and unfortunately the problem
> remains as before. I'll try to file a bug report with mupdf.
Hi,
Here a first patch that prevent producing SVG when mutool has a
version > 1.20. Feel free to comment and fix.
Best regards,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Prevent-DocView-to-produce-SVG-with-mutool-for-versi.patch --]
[-- Type: text/x-patch, Size: 1459 bytes --]
From 21c0e276189438ef04500697ef22ce663f650b3b Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Sat, 7 Jan 2023 16:40:58 +0100
Subject: [PATCH] Prevent DocView to produce SVG with mutool for version > 1.20
(bug#60308)
* lisp/doc-view.el (doc-view-mutool-version): New variable
containing the mutool version string.
(doc-view-mupdf-use-svg): If the mutool version is higher than
1.20 do not use SVG output.
---
lisp/doc-view.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 7c272f52fb3..3253387e01e 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -209,7 +209,19 @@ doc-view-pdf->png-converter-function
function)
:version "24.4")
-(defcustom doc-view-mupdf-use-svg (image-type-available-p 'svg)
+(defvar doc-view-mutool-version
+ (let ((mutool (executable-find "mutool")))
+ (if mutool
+ (with-temp-buffer
+ (call-process mutool nil t nil "-v")
+ (goto-char (point-min))
+ (re-search-forward "^mutool version \\([^ ]+\\)\n")
+ (match-string 1))
+ "")))
+
+(defcustom doc-view-mupdf-use-svg (and (image-type-available-p 'svg)
+ (string-version-lessp doc-view-mutool-version
+ "1.20"))
"Whether to use svg images for PDF files."
:type 'boolean
:version "29.1")
--
2.39.0
[-- Attachment #3: Type: text/plain, Size: 18 bytes --]
--
Manuel Giraud
next prev parent reply other threads:[~2023-01-07 15:48 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 21:39 bug#60308: 30.0.50; Can't read some PDF files any more Jean Louis
2023-01-05 16:50 ` Jean Louis
2023-01-05 17:12 ` Ihor Radchenko
2023-01-05 18:31 ` Eli Zaretskii
2023-01-05 20:58 ` Gregory Heytings
2023-01-06 6:40 ` Eli Zaretskii
2023-01-06 9:58 ` Stephen Berman
2023-01-06 10:10 ` Gregory Heytings
2023-01-06 10:22 ` Gregory Heytings
2023-01-06 12:51 ` Jean Louis
2023-01-06 10:32 ` Stephen Berman
2023-01-06 11:12 ` Gregory Heytings
2023-01-06 11:44 ` Stephen Berman
2023-01-06 12:04 ` Eli Zaretskii
2023-01-06 12:22 ` Gregory Heytings
2023-01-06 12:55 ` Eli Zaretskii
2023-01-06 20:38 ` Stephen Berman
2023-01-07 15:48 ` Manuel Giraud [this message]
2023-01-07 18:25 ` Gregory Heytings
2023-01-07 18:35 ` Eli Zaretskii
2023-01-07 18:45 ` Gregory Heytings
2023-01-07 18:37 ` Manuel Giraud
2023-01-07 18:59 ` Gregory Heytings
2023-01-07 20:07 ` Eli Zaretskii
2023-01-07 20:58 ` Manuel Giraud
2023-01-07 22:19 ` Gregory Heytings
2023-01-08 12:57 ` Manuel Giraud
2023-01-10 10:59 ` Gregory Heytings
2023-01-11 10:35 ` Manuel Giraud
2023-01-11 16:26 ` Gregory Heytings
2023-01-11 17:03 ` Eli Zaretskii
2023-01-11 19:33 ` Gregory Heytings
2023-01-14 8:53 ` Eli Zaretskii
2023-01-07 20:53 ` Manuel Giraud
2023-01-06 12:48 ` Jean Louis
2023-01-05 23:54 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmbqfird.fsf@ledu-giraud.fr \
--to=manuel@ledu-giraud.fr \
--cc=60308@debbugs.gnu.org \
--cc=bugs@gnu.support \
--cc=eliz@gnu.org \
--cc=gregory@heytings.org \
--cc=stephen.berman@gmx.net \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.