GNU bug report logs -
#62713
29.0.60; DocView shows wrong conversion indicator when configured to use svg images
Previous Next
Reported by: Gregor Zattler <grfz <at> gmx.de>
Date: Fri, 7 Apr 2023 16:03:02 UTC
Severity: minor
Found in version 29.0.60
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
[திங்கள் செப்டம்பர் 25, 2023] Visuwesh wrote:
> It is better solved by writing a separate pdf->svg converter function.
> Right now, the svg conversion is tacked on top of pdf->png converter
> function used for MuPDF. This was done because I thought only MuPDF
> supported pdf->svg conversion but later I was informed that poppler has
> utilities to do too.
And looks like the poppler utility pdftocairo does not work the doc-view
expects it to when generating svg images. AFAICT, there is no way to
make pdftocairo to generate a svg image per page like other tools do. I
cannot loop either as there is also no way to know the number of pages
beforehand. The png function also has hacks since pdftocairo is not
cooperative, and changing doc-view to not use
doc-view--image-file-pattern does not seem to be easy. I attach the
patch named "doc-view-general-svg-wip.patch" which has my WIP and it
works just fine for MuPDF.
This particular problem can be easily solved by the following simple
patch instead:
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index b856b09c8b7..c0d27bdc68a 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1283,7 +1283,8 @@ doc-view-pdf->png-converter-mupdf
(expand-file-name
doc-view-epub-user-stylesheet)))))))
(doc-view-start-process
- "pdf->png" doc-view-pdfdraw-program
+ (concat "pdf->" (symbol-name doc-view--image-type))
+ doc-view-pdfdraw-program
`(,@(doc-view-pdfdraw-program-subcommand)
,@options
,pdf
But if you say we don't bother about pdftocairo support and implement
the generic support system, I can prepare a patch without the pdftocairo
stuff, and add some documentation to aid the users to write custom
converter functions.
[doc-view-general-svg-wip.patch (text/x-diff, attachment)]
This bug report was last modified 1 year and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.