1

I am definitely no newbie and I think I now followed every little advice I could find online, and after 2 days doc-view is still not working :-( (it works fine on my older laptop under windows 10)

On my new laptop (windows 10) I installed emacs 25.2.1 (x86_64-w64-mingw32), I installed 64-bit-Ghostscript, I put the line

(setq doc-view-ghostscript-program "C:\gs\gs9.20\bin") 

in my .emacs, I checked the PATH, I copied the dlls zlib1.dll, libtiff-5.dll, libpng16-16.dll, gsdll64.dll in the emacs bin directory.

Yesterday, I installed cygwin64 and it worked partly, but doc-view was breaking from time to time when the document contains images, and I thought it could be a problem, when my ming32-based emacs uses some cygwin programming or dlls. But now, without cygwin, doc-view stopped to work.

I am not really familiar with emacs lisp, but evaluating

(image-type-available-p 'png)

yields t. Opening a pdf-File yield just the pdf source text. Forcing Emacs to enter doc-view-mode yields Unable to render file. View extraced text instead?

The ghostscript executables are in my PATH.

Any suggestions, how I can debug this problem?

1 Answer 1

1

Sorry, the answer is simple: the string constant in

 (setq doc-view-ghostscript-program "C:\gs\gs9.20\bin") 

is wrong; the backslashes seem to be interpreted as special characters. And I forgot to specify the program. The correct statement is:

(setq doc-view-ghostscript-program "C:/gs/gs9.20/bin/gswin64c.exe")
1
  • 1
    If you have C:/gs/gs9.20/bin/ in your PATH, it will suffice to say (setq doc-view-ghostscript-program "gswin64c.exe"). If you want to use backslash as a directory separator, double it like \\. The function expand-file-name is also handy. You can try (setq doc-view-ghostscript-program (expand-file-name "C:\\gs\\gs9.20\\bin\\gswin64c.exe")) Commented Aug 4, 2017 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.