ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial

39 Document Viewing

DocView mode (doc-view-mode) is a viewer for DVI, Postscript (PS), and PDF documents. It provides features such as slicing, zooming, and searching inside documents. It works by converting the document to a set of images using the gs (GhostScript) command, and displaying those images.

When you visit a PDF or DVI file, Emacs automatically switches to DocView mode. When you visit a Postscript file, Emacs switches to PS mode, a major mode for editing Postscript files as text; however, it also enables DocView minor mode, so you can type C-c C-c to view the document with DocView. (PDF and DVI files, unlike Postscript files, are not usually human-editable.) In either case, repeating C-c C-c (doc-view-toggle-display) toggles between DocView and the file text.

You can explicitly toggle DocView mode with the command M-x doc-view-mode, and DocView minor mode with the command M-x doc-view-minor-mode.

When DocView mode starts, it displays a welcome screen and begins formatting the file, page by page. It displays the first page once that has been formatted.

When in DocView mode, you can enlarge or shrink the document with + (doc-view-enlarge) and - (doc-view-shrink). To specify the default size for DocView, set or customize the variable doc-view-resolution.

To kill the DocView buffer, type k (doc-view-kill-proc-and-buffer). To bury it, type q (quit-window).

blog comments powered by Disqus