[திங்கள் செப்டம்பர் 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.