DocViewMode

DocViewMode is another file mode viewer like DviViewMode which adds support for PDF and PS files written by TassiloHorn. It’s officially part of Emacs starting in version 23.

Conversion is done with ghostscript and various other tools. It even supports regexp search in documents. According to the “Document View” section of the EmacsManual,

‘gs’ is a hard requirement. For DVI files, ‘dvipdf’ or ‘dvipdfm’ is needed. For OpenDocument and Microsoft Office documents, the ‘unoconv’ tool is needed.
The needed external tools for this document type have to be available, emacs needs to run in a graphical frame, and PNG image support has to be compiled into emacs.

You can get a snapshot of doc-view.el at doc-view.el.

This can be customized via:

  M-x customize-group RET doc-view RET

Emacs 23 Cygwin instructions

  1. Install several packages:
    1. xpdf
    2. ghostscript
  2. Restart Emacs.
  3. It should just work.

ntEmacs 24 :

  1. Set up png support, you’ll have to look elsewhere for instructions on this.
  2. Install ghostscript and add the bin and lib directories to your path.
  3. Get xpdf for windows and put the executables somewhere on your path.
  4. Set this in your .emacs: (setq doc-view-ghostscript-program “gswin32c”)
  5. That should be it.

I like to visit/read pdf-files in emacs, but one (or two) thing(s) that I miss: to save/load (automatically) the current/saved position or pagenumber. And if possible also the slice that I had set. – Michael

I don’t know about the latter, but it should be possible to use BookMarks to save the last position within DocView. It would take making an EmacsLisp function and adding it to ‘kill-buffer-hook’AaronHawley


MultimediaModes