Hot answers tagged

22 votes

How to view and edit pdf files in emacs?

You can give a try to pdf-tools, which provides most of the requested functionality
  • 1,015
18 votes

How to view and edit pdf files in emacs?

Since Emacs 23, you can view PDF files as images just by opening them like normal files as long as you have Emacs running in X rather than a terminal. You can also see and edit the PDF directly, which ...
10 votes
Accepted

Doc-view change background to black

pdf-tools If you decide to install pdf-tools package (also available on Melpa) to view PDF files (instead of doc-view-mode), you can view the PDF in "midnight mode" by using the default binding C-c C-...
  • 24.6k
10 votes

Make doc-view use mupdf for pdf files

The default resolution is probably around 90 dpi. (require 'doc-view) (setq doc-view-resolution 144) (Or set higher as you need.) You may need to run doc-view-clear-cache first for the change to be ...
  • 233
10 votes

read e-books in Emacs

Try nov (installable via melpa). It is a reasonable start for reading ePUBs in Emacs.
  • 1,135
7 votes
Accepted

Org-mode file hyperlinks always use doc-view, can't force it to use external pdf viewer

I fixed the problem by using M-x customize-variable org-file-apps and adding a cons-cell with Extension: \.pdf\' and Command: evince %s at the top. Oddly enough, links starting with file+sys: still ...
  • 313
7 votes
Accepted

improve doc-view display quality

If by "render larger" you mean that the dimensions of the rendered png image are larger, then you could use some of the doc-view functions to fit the image to your window: doc-view-fit-page-to-window, ...
  • 31.6k
7 votes
Accepted

docview: suppress "File X is too large, really open?" confirmation

The variable is large-file-warning-threshold. Documentation: large-file-warning-threshold is a variable defined in `files.el'. Its value is 10000000 Documentation: Maximum size of file above which a ...
  • 5,584
6 votes
Accepted

doc-view-mode-hook?

Mode hooks exist, whether or not they are predefined variables. If doc-view-mode is a major mode then doc-view-mode-hook is alive and well. That is to say that the coding conventions call for a ...
  • 71.9k
5 votes
Accepted

How to jump to a page in `DocView` mode when a pdf contains a roman numeral numbered introduction?

In pdf-tools you can type M-g l (pdf-view-goto-label), which asks for a page-label, which is usually equal to the displayed page-number.
  • 3,306
5 votes

Enable follow-mode for PDF in doc-view/pdf-view-mode

This feature does not yet seem to exist. I have opened an issue requesting this feature on pdf-tools git.
4 votes

read e-books in Emacs

.epub are in fact .zip file with .xhtml file inside. You can just open them, find the .xhtml file that has the content (often content.html), and open it. Then you can call shr-render-buffer to display ...
4 votes

Org-mode file hyperlinks always use doc-view, can't force it to use external pdf viewer

I added (add-to-list 'org-file-apps '("pdf" . "evince %s")) to my init-file. Now C-c C-o opens any PDF in evince and C-u C-u C-c C-o opens them in doc-view.
3 votes

pdf-tools indirect buffers

Indirect buffer need special support, since their buffer-file-name is nil. But this is currently not implemented in pdf-tools. So it seems that the answer is no.
  • 3,306
3 votes

Doc-view change background to black

I use the following functions to reverse the colors in a PDF. Note that it uses ImageMagick under the hood and will not work without it: (defun define-doc-view-current-cache-dir () ;; doc-view-...
  • 31.6k
3 votes
Accepted

PDF doc view flickers continously

I had a similar problem with PDFView and it turned out that the flickering was caused by Blink-Cursor mode. Try to disable this minor mode in the buffer.
  • 196
3 votes
Accepted

How to disable DocView mode (completely)?

Other than the (rassq-delete-all #'doc-view-mode-maybe auto-mode-alist) suggested by Tyler (but note you need to use ...-maybe), you can also be more drastic: ;; Die, Doc-View-mode! die! (defalias '...
  • 25.7k
2 votes

read e-books in Emacs

EDIT Actually this answer seems more useful than presumed initially. I only tried this method on one book, and that book's conversion looked bad. I have tried multiple other books now, and most look ...
  • 4,090
2 votes

read e-books in Emacs

I recommend emacs-ereader. My experience is that it errs out less often while parsing an epub than nov and it too is installable as a package. Further, it supports annotations, integrates decent with ...
  • 491
2 votes
Accepted

How to give my emacs access to ghostscript?

The variable doc-view-ghostscript-program is customizable: (setq doc-view-ghostscript-program "C:/Program Files (x86)/gs/gs9.09/bin/gswin32.exe")
  • 18.1k
2 votes
Accepted

Is there a fast way to get a docview link to a specific page in a PDF document?

There is org-docview which allows you to create usual org-links to documents open in docview-mode. Using C-c l you can store a link and using C-c C-l you can insert it. I would actually suggest using ...
  • 983
2 votes

Preview PDFs with helm-bibtex

Look into helm's persistent actions. Basically allows you to execute an action (like opening the PDF) without ending the helm session. If your helm-bibtex is setup to use pdf-tools for viewing PDFs (...
  • 2,500
1 vote

Use mutool / mpdf to render pdf documents in doc-view mode in Windows

mutool.exe is enough to view PDF in Emacs, put mutool.exe in .exec-path. doc-view-mode-p function always return nil for 'pdf TYPE. you need to let doc-view-mode-p return t for 'pdf. (defadvice doc-...
  • 206
1 vote

Use mutool / mpdf to render pdf documents in doc-view mode in Windows

It should just work as long as doc-view-pdfdraw-program either contains the absolute file name of the mudraw executable, or the executable can be found in exec-path. If that is the case, then doc-...
  • 25.7k
1 vote
Accepted

doc-view not working with emacs 25.2.1. (x86_64-w64-mingw32)

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 ...
  • 141
1 vote
Accepted

Why does viewing PGP encrypted PDF fail?

When you open a encrypted file, Emacs automatically replaces the contents of it's buffer with a decrypted version of it. Though doc-view, and for that matter pdf-view as well, does not care for the ...
  • 3,306
1 vote

Gnome Tracker integration with emacs

Some years ago I wrote a dired-based interface to tracker results. It's not polished, but in case it is of any use, you can find the code here: https://www.emacswiki.org/emacs/Tracker
  • 111
1 vote

Gnome Tracker integration with emacs

Looking at Martin's link to using baloo under KDE, the following function calls tracker's sparql query and shows the results in a new frame. A lot more needs to be done and could be added to make ...
1 vote

Emacs 24 Gui and Retina Display

https://github.com/railwaycat/emacs-mac-port this will actually help you . It has retina display build in support in the doc-view-mode.
  • 111
1 vote
Accepted

Scroll other window (doc-view) -- by page -- with mouse wheel

When doc-view-mode is enabled, mwheel-scroll-up-function is set locally to be doc-view-scroll-up-or-next-page; and, mwheel-scroll-down-function is set locally to be doc-view-scroll-down-or-previous-...
  • 18.1k

Only top scored, non community-wiki answers of a minimum length are eligible