GithubHelp home page GithubHelp logo

politza / pdf-tools Goto Github PK

View Code? Open in Web Editor NEW
1.6K 50.0 162.0 2.08 MB

Emacs support library for PDF files.

License: GNU General Public License v3.0

Makefile 0.48% Emacs Lisp 47.46% C++ 0.34% C 49.35% TeX 0.15% Shell 1.30% M4 0.66% Batchfile 0.14% Dockerfile 0.12%

pdf-tools's Introduction

pdf-tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdf-tools's Issues

`pdf-occur` : No such column: 2

First of all, I'd like to thank you for making pdf-tools. It's an incredible improvement of doc-view and has finally pushed me away from using evince.

I just installed pdf-tools and am experiencing a minor annoyance in pdf-occur. It looks as if it's trying to access the third column in a 2 column table. The debugger output is below.

Debugger entered--Lisp error: (error "No such column: 2")
  signal(error ("No such column: 2"))
  error("No such column: %s" 2)
  tablist-move-to-column(2)
  tablist-next-line(1)
  call-interactively(tablist-next-line nil nil)
  command-execute(tablist-next-line)

Every time I scroll down or up using tablist-next-line and tablist-previous-line in the occur window I get notified of the error in the minibuffer:

pdf-tools-bug

Forward search indicator arrow constantly above correct line

I use a current Emacs from git and pdf-tools-20150208.320 from MELPA. When I call pdf-sync-forward-search from inside AUCTeX (or AUCTeX's "PDF Tools" viewer command), the red arrow indicating the line in the PDF buffer is constantly shown a bit too high.

I usually use slicing (s b) so that the margins are cut off, however that doesn't seem to be the culprit. It seems the arrow is always a fixed amount of centimeters/pixels too high, i.e., the distance between the arrow and the correct line is always ~2cm here on my screen even when setting the zoom level to "very large" or "very small".

I'm pretty sure that last week (with the current pdf-tools/emacs versions at that time) I didn't have that issue. I'm also happy to do any debugging that might help to spot the problem.

Can't save file from /tmp to new location

Hi, I download pdf files to /tmp and sometimes I need to save them to my home folder. However, when I use C-x C-w to save-as (e.g. new file name test.pdf) I get
pdf-info-query: epdfinfo: Error opening /home/user/test.pdf:No such file or directory

Unable to compile on Debian Wheezy x86_64

./configure produces (amongst other things):

Is writing annotations enabled ?      no   (requires poppler-glib >= 0.19.4)

because the Wheezy version of poppler-glib is 0.18.4-6. But then make fails with:

poppler-hack.cc:1:27: fatal error: poppler/Annot.h: No such file or directory
compilation terminated

Server side did not build

I installed pdf-tools via melpa and then, within emacs, tried to build the server by M-x pdf-tools-install RET. I immediately got an error: pdf-tools-install: No executable `epdfinfo' available. The compilation went ahead but failed as well:

-- mode: compilation; default-directory: "~/s/research/shale.gas.environmental.footprint/pr/" --
Compilation started at Thu Feb 5 08:49:48

make V=0 -kC '/home/ucecesf/.emacs.d/elpa/pdf-tools-20150204.1206/build' melpa-build
make: Entering directory /home/ucecesf/synced/dotfiles/emacs.d/elpa/pdf-tools-20150204.1206/build' cd server && ./autogen.sh Running autoreconf... configure.ac:14: installing './ar-lib' configure.ac:6: installing './install-sh' configure.ac:6: installing './missing' Makefile.am:10: warning: compiling 'synctex_parser.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac' Makefile.am: installing './depcomp' cd server && ./configure -q ./configure: line 4613: syntax error near unexpected tokenpng,'
./configure: line 4613: PKG_CHECK_MODULES(png, libpng)' make: *** [server/Makefile] Error 2 make: Targetmelpa-build' not remade because of errors.
make: Leaving directory `/home/ucecesf/synced/dotfiles/emacs.d/elpa/pdf-tools-20150204.1206/build'

Compilation exited abnormally with code 2 at Thu Feb 5 08:49:55

Support for Windows

Hello, my apologies, I don't want this to sound like a rant, but seriously, why would somebody decide to develop so useful extension for Emacs (which is cross-platform) and lock it for Unix? For instance

epdfinfo.c:19:17: fatal error: err.h: No such file or directory
 #include <err.h>

Why would one even use err.h explicitly in such an extension? There are tons of cross-platform well-designed libraries these days (even libpoppler is cross-platform). Would you find it challenging to clean up this platform-specific code so that we could finally build this extension on Windows? Maybe you need some help with it? Thanks for your efforts.

Option to not use sudo?

Hi,

I install this on a machine where I don't have sudo access but I am able to build stuff on my own in my $HOME. That is how I successfully installed pdf-tools 0.3.

With 0.4 version, the installation steps have changed and I need to do make install-server-deps which requires sudo. Can you please add instructions on how I would go about installing this without sudo?

Thanks.

epdfinfo: Failed to render page 1

I have just installed pdf-tools through Melpa on OS X, and it seems that the compilation of epdfinfo went well:

make V=0 -kC '/Users/schmitta/.emacs.d/elpa/pdf-tools-20150212.1539/build'  melpa-build
cd server && ./autogen.sh
Running autoreconf...
configure.ac:15: installing './ar-lib'
configure.ac:11: installing './compile'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'
cd server && ./configure -q

Is case-sensitive searching enabled ?     yes
Is modifying text annotations enabled ?   yes
Is modifying markup annotations enabled ? yes

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C server
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
  CC       libsynctex_a-synctex_parser.o
  CC       libsynctex_a-synctex_parser_utils.o
  AR       libsynctex.a
  CC       epdfinfo-epdfinfo.o
epdfinfo.c:270:19: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only. Due
      to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3)
      instead. [-Wdeprecated-declarations]
      filename =  tempnam(NULL, "epdfinfo");
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/stdio.h:391:7: note: 
      'tempnam' has been explicitly marked deprecated here
char    *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam);
         ^
epdfinfo.c:3148:52: warning: passing 'int *' to parameter of type 'guint *' (aka 'unsigned int *') converts between
      pointers to integer types with different sign [-Wpointer-sign]
  poppler_page_get_text_layout (page, &rectangles, &nrectangles);
                                                   ^~~~~~~~~~~~
/usr/local/Cellar/poppler/0.29.0/include/poppler/glib/poppler-page.h:103:79: note: passing argument to parameter
      'n_rectangles' here
                                                          guint              *n_rectangles);
                                                                              ^
2 warnings generated.
  CXX      epdfinfo-poppler-hack.o
  CXXLD    epdfinfo
cp -p server/epdfinfo ..
/Applications/Xcode.app/Contents/Developer/usr/bin/make distclean
rm -rf -- pdf-tools-0.50
rm -f -- pdf-tools-0.50.tar
rm -f -- lisp/*.elc
! [ -f server/Makefile ] || /Applications/Xcode.app/Contents/Developer/usr/bin/make -C server clean
test -z "epdfinfo" || rm -f epdfinfo
test -z "libsynctex.a" || rm -f libsynctex.a
rm -f *.o
! [ -f server/Makefile ] || /Applications/Xcode.app/Contents/Developer/usr/bin/make -C server distclean
test -z "epdfinfo" || rm -f epdfinfo
test -z "libsynctex.a" || rm -f libsynctex.a
rm -f *.o
rm -f *.tab.c
test -z "" || rm -f 
test . = "." || test -z "" || rm -f 
rm -f config.h stamp-h1
rm -rf -- Makefile.in aclocal.m4 config.h.in configure depcomp install-sh missing autom4te.cache epdfinfo-0.50.tar.gz
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f cscope.out cscope.in.out cscope.po.out cscope.files
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -rf ./.deps
rm -f Makefile

Server successfully build.

However I cannot seem to open a pdf, I get the following error:

Debugger entered--Lisp error: (error "epdfinfo: Failed to render page 1")
  signal(error ("epdfinfo: Failed to render page 1"))
  error("epdfinfo: %s" "Failed to render page 1")
  (cond ((null status) response) ((eq status (quote error)) (error "epdfinfo: %s" response)) ((eq status (quote interrupted)) (error "epdfinfo: Command was interrupted")) (t (error "internal error: invalid response status")))
  (if pdf-info-asynchronous nil (while (and (not done) (eq (process-status (pdf-info-process)) (quote run))) (accept-process-output (pdf-info-process) 0.01)) (if (and (not done) (not (eq (process-status (pdf-info-process)) (quote run)))) (progn (error "The epdfinfo server quit unexpectedly."))) (cond ((null status) response) ((eq status (quote error)) (error "epdfinfo: %s" response)) ((eq status (quote interrupted)) (error "epdfinfo: Command was interrupted")) (t (error "internal error: invalid response status"))))
  (let* ((query (concat (mapconcat (quote pdf-info-query--escape) (cons cmd args) ":") "\n")) (callback (function (lambda (closure response) (progn (let* (... ...) (pdf-info-query--log response) (let ... ...)))))) response status done (closure (or pdf-info-asynchronous (function (lambda (s r) (setq status s response r done t)))))) (pdf-info-query--log query t) (tq-enqueue pdf-info--queue query "^\\.\n" closure callback) (if pdf-info-asynchronous nil (while (and (not done) (eq (process-status (pdf-info-process)) (quote run))) (accept-process-output (pdf-info-process) 0.01)) (if (and (not done) (not (eq (process-status (pdf-info-process)) (quote run)))) (progn (error "The epdfinfo server quit unexpectedly."))) (cond ((null status) response) ((eq status (quote error)) (error "epdfinfo: %s" response)) ((eq status (quote interrupted)) (error "epdfinfo: Command was interrupted")) (t (error "internal error: invalid response status")))))
  pdf-info-query(renderpage "/Users/schmitta/work/talks/Grenoble_2015/slides.pdf" 1 812)
  pdf-info-renderpage(1 812)
  (let ((data (pdf-info-renderpage page min-width))) (pdf-cache-put-image page min-width data) data)
  (or (pdf-cache-get-image page min-width max-width) (let ((data (pdf-info-renderpage page min-width))) (pdf-cache-put-image page min-width data) data))
  (if pdf-cache-image-inihibit (pdf-info-renderpage page min-width) (or (pdf-cache-get-image page min-width max-width) (let ((data (pdf-info-renderpage page min-width))) (pdf-cache-put-image page min-width data) data)))
  pdf-cache-renderpage(1 812 812)
  (let* ((size (pdf-view-desired-image-size page window)) (data (pdf-cache-renderpage page (car size) (if (not (pdf-view-use-scaling-p)) (car size) (* 2 (car size))))) (hotspots (pdf-view-apply-hotspot-functions window page size))) (create-image data (pdf-view-image-type) t :width (car size) :map hotspots :pointer (quote arrow)))
  pdf-view-create-page(1 #<window 341 on slides.pdf>)
  (pdf-view-display-image (pdf-view-create-page page window) window)
  pdf-view-display-page(1 #<window 341 on slides.pdf>)
  (if (not (eq t window)) (pdf-view-display-page (image-mode-window-get (quote page) window) window) (let ((--dolist-tail-- (get-buffer-window-list nil nil t))) (while --dolist-tail-- (let ((win (car --dolist-tail--))) (pdf-view-display-page (image-mode-window-get (quote page) win) win) (setq --dolist-tail-- (cdr --dolist-tail--))))))
  (if pdf-view-inhibit-redisplay nil (if (not (eq t window)) (pdf-view-display-page (image-mode-window-get (quote page) window) window) (let ((--dolist-tail-- (get-buffer-window-list nil nil t))) (while --dolist-tail-- (let ((win (car --dolist-tail--))) (pdf-view-display-page (image-mode-window-get (quote page) win) win) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (force-mode-line-update))
  pdf-view-redisplay(#<window 341 on slides.pdf>)
  (progn (pdf-view-redisplay window))
  (if (window-live-p window) (progn (pdf-view-redisplay window)))
  (let ((changing-p (not (eq page (image-mode-window-get (quote page) window))))) (if changing-p (progn (run-hooks (quote pdf-view-before-change-page-hook)) (let* ((v window)) (image-mode-window-put (quote page) page v)) (run-hooks (quote pdf-view-change-page-hook)))) (if (window-live-p window) (progn (pdf-view-redisplay window))) (if changing-p (progn (pdf-view-deactivate-region) (force-mode-line-update) (run-hooks (quote pdf-view-after-change-page-hook)))))
  (progn (if (window-live-p window) (progn (select-window window))) (let ((changing-p (not (eq page (image-mode-window-get (quote page) window))))) (if changing-p (progn (run-hooks (quote pdf-view-before-change-page-hook)) (let* ((v window)) (image-mode-window-put (quote page) page v)) (run-hooks (quote pdf-view-change-page-hook)))) (if (window-live-p window) (progn (pdf-view-redisplay window))) (if changing-p (progn (pdf-view-deactivate-region) (force-mode-line-update) (run-hooks (quote pdf-view-after-change-page-hook))))))
  (unwind-protect (progn (if (window-live-p window) (progn (select-window window))) (let ((changing-p (not (eq page (image-mode-window-get ... window))))) (if changing-p (progn (run-hooks (quote pdf-view-before-change-page-hook)) (let* ((v window)) (image-mode-window-put (quote page) page v)) (run-hooks (quote pdf-view-change-page-hook)))) (if (window-live-p window) (progn (pdf-view-redisplay window))) (if changing-p (progn (pdf-view-deactivate-region) (force-mode-line-update) (run-hooks (quote pdf-view-after-change-page-hook)))))) (internal--after-save-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (if (window-live-p window) (progn (select-window window))) (let ((changing-p (not (eq page ...)))) (if changing-p (progn (run-hooks (quote pdf-view-before-change-page-hook)) (let* (...) (image-mode-window-put ... page v)) (run-hooks (quote pdf-view-change-page-hook)))) (if (window-live-p window) (progn (pdf-view-redisplay window))) (if changing-p (progn (pdf-view-deactivate-region) (force-mode-line-update) (run-hooks (quote pdf-view-after-change-page-hook)))))) (internal--after-save-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (if (window-live-p window) (progn (select-window window))) (let ((changing-p (not ...))) (if changing-p (progn (run-hooks ...) (let* ... ...) (run-hooks ...))) (if (window-live-p window) (progn (pdf-view-redisplay window))) (if changing-p (progn (pdf-view-deactivate-region) (force-mode-line-update) (run-hooks ...))))) (internal--after-save-selected-window save-selected-window--state))))
  pdf-view-goto-page(1)
  (progn (select-window (car save-selected-window--state) (quote norecord)) (pdf-view-goto-page (or (image-mode-window-get (quote page) t) 1)))
  (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (pdf-view-goto-page (or (image-mode-window-get (quote page) t) 1))) (internal--after-with-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (pdf-view-goto-page (or (image-mode-window-get (quote page) t) 1))) (internal--after-with-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-with-selected-window (car winprops)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (pdf-view-goto-page (or (image-mode-window-get (quote page) t) 1))) (internal--after-with-selected-window save-selected-window--state))))
  (progn (let ((save-selected-window--state (internal--before-with-selected-window (car winprops)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (pdf-view-goto-page (or (image-mode-window-get ... t) 1))) (internal--after-with-selected-window save-selected-window--state)))))
  (if (and (windowp (car winprops)) (null (image-mode-window-get (quote image) winprops))) (progn (let ((save-selected-window--state (internal--before-with-selected-window (car winprops)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (pdf-view-goto-page (or ... 1))) (internal--after-with-selected-window save-selected-window--state))))))
  (let ((ol (image-mode-window-get (quote overlay) winprops))) (if ol (progn (setq ol (copy-overlay ol)) (move-overlay ol (point-min) (point-max))) (setq ol (make-overlay (point-min) (point-max) nil t)) (overlay-put ol (quote pdf-view) t)) (overlay-put ol (quote window) (car winprops)) (if (windowp (car winprops)) nil (progn (or (eq t (car winprops)) (signal (quote cl-assertion-failed) (list (quote (eq t ...))))) nil) (delete-overlay ol)) (image-mode-window-put (quote overlay) ol winprops) (let ((--dolist-tail-- (overlays-in (point-min) (point-max)))) (while --dolist-tail-- (let ((ov (car --dolist-tail--))) (if (and (windowp (overlay-get ov ...)) (not (window-live-p ...))) (progn (delete-overlay ov))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if (and (windowp (car winprops)) (null (image-mode-window-get (quote image) winprops))) (progn (let ((save-selected-window--state (internal--before-with-selected-window (car winprops)))) (save-current-buffer (unwind-protect (progn (select-window ... ...) (pdf-view-goto-page ...)) (internal--after-with-selected-window save-selected-window--state)))))))
  pdf-view-new-window-function((#<window 341 on slides.pdf> (overlay . #<overlay from 1 to 3461451 in slides.pdf>) (page . 1)))
  run-hook-with-args(pdf-view-new-window-function (#<window 341 on slides.pdf> (overlay . #<overlay from 1 to 3461451 in slides.pdf>) (page . 1)))
  image-mode-winprops(nil t)
  image-mode-reapply-winprops()
  #<subr set-window-buffer>(nil #<buffer slides.pdf> nil)
  ad-Advice-set-window-buffer(#<subr set-window-buffer> nil #<buffer slides.pdf>)
  apply(ad-Advice-set-window-buffer #<subr set-window-buffer> (nil #<buffer slides.pdf>))
  set-window-buffer(nil #<buffer slides.pdf>)
  #[(buffer-or-name &optional norecord force-same-window) "\306๏ฟฝ!\211๏ฟฝ\307 =\204s

Feature request: Support AUCTeX region files in backward search

AUCTeX supports compiling only a given region (for speedy compilation of the part you currently work on in large TeX docs). It does that by creating a region file (TeX-region) containing the header of your document, the marked region, and the trailer, and then compiles that.

Now it would be awesome if when you open the TeX-region PDF with pdf-view-mode and double-click in there, you'd backward search to the original tex document, not the artificial TeX-region file.

The TeX-region file's buffer (which you can assume exists) has a buffer-local variable TeX-region-orig-buffer naming the buffer the region is extracted from, i.e., the buffer where you actually want to jump to. Now what's missing is the right line number which you can compute from the offset markers like \message{ !name(the-real-doc.tex) !offset(353) } that are placed just before and after the cut out region.

Problem with `pdf-sync-display-pdf`

I would really like to be able to C-c C-g to jump to the location in the pdf file corresponding to the line/column position in tex file, however I always get

pdf-info-query: epdfinfo: Destination not found

message. I initially thought that some of my other LaTeX related packages may be interfering, but emacs -Q followed by

(require 'package)
(package-initialize)

(package-activate 'auctex)
(setq TeX-source-correlate-method 'synctex)
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)

(package-activate 'pdf-tools)
(pdf-tools-install)

and opening the tex and pdf files yields the same message.

I have pdf-tools 8e423bf so the only commits following this one are the MELPA related ones.

Other info:

emacs-version
GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3) of 2014-10-21 on bitzer.hoetzel.info

auctex-11.88

Unable to write image

I'm getting an error "Unable to write image" on each pdf file I try to open. I'm using Emacs 24.4 on Arch Linux, poppler-glib 0.28.1, libpng 1.6.15, zlib 1.2.8 and installed the package as described in the README. The error persists when using emacs -Q and executing

(package-initialize t)
(package-activate 'pdf-tools)
(pdf-tools-install)

so its likely not a conflict with another package.

Moreover, when trying to kill the undecoded pdf buffer that's left after the error message, I get a "Symbol's function definition is void: with-file-modes" error. The with-file-modes macro seems to be available only in the devel version of Emacs.

No poppler-glib package in Ubuntu 12.04

I get the following error with ./configure in ubuntu 12.04:

configure: error: Package requirements (poppler-glib) were not met:

No package 'poppler-glib' found

Default markup colors

It seems all of the pdf-annot-add-*-markup-annotation functions support color. I have not found a way to set the color persistently, and for some reason the default color on my system (Gnome 3.14) is black...

screenshot of dark highlight

I don't know if it depends on the region face, which for some reason takes on foreground: gtk_selection_fg_color and background: gtk_selection_bg_color which either are weird or wrong (black on black) .

Would it be possible to add default values to colors for markups?

Thanks,
Rasmus

Dual page view?

Thanks for this amazing piece of software!

Are there any plans of implementing dual page view? This would be really, really useful when typesetting books from LaTeX (when working with -- and judging -- the layout).

melpa

Thank you for this amazing package. Since 0.4 it works fast.

Do you plan to add the pdf-tools in melpa repository?

feature request: trimming whitespace on page edges

This would be very useful for viewing eg LaTeX documents side-by-side with their source, especially if screen space is limited. Ideally, this could work similarly to okular: establish a bounding box for a page, trim the excess (leaving only a bit), then apply relevant magnification (W, P).

`Failed to render page` on OS X

I get the following errors when attempting to view a PDF using pdf-tools on OS X.

14:41:06 close:/Users/ssorensen/src/pdf-tools/test/test.pdf
14:41:06 OK
1
.
14:41:06 pagesize:/Users/ssorensen/src/pdf-tools/test/test.pdf:1
14:41:06 OK
612.000000:792.000000
.
14:41:06 renderpage:/Users/ssorensen/src/pdf-tools/test/test.pdf:1:2535
14:41:06 ERR
Failed to render page 1
.
14:41:06 number-of-pages:/Users/ssorensen/src/pdf-tools/test/test.pdf
14:41:06 OK
6                           

poppler_page_render is returning CAIRO_STATUS_NO_MEMORY.

  • OS X Yosemite
  • GNU Emacs 24.4.90.1
  • poppler: stable 0.29.0 (bottled)

make error

Hi,
Great package, really useful ! However, I cannot manage to compile under up-to-date archlinux as make fails with the messages below, any idea ?

c.

make[1]: Entering directory '/tmp/pdf-tools/src'
make all-am
make[2]: Entering directory '/tmp/pdf-tools/src'
gcc -DHAVE_CONFIG_H -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/poppler/glib -I/usr/include/poppler -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/poppler -w -g -O2 -MT epdfinfo.o -MD -MP -MF .deps/epdfinfo.Tpo -c -o epdfinfo.o epdfinfo.c
In file included from epdfinfo.c:32:0:
epdfinfo.h:121:13: error: conflicting types for 'poppler_annot_set_rectangle'
extern void poppler_annot_set_rectangle (PopplerAnnot_, PopplerRectangle);
^
In file included from /usr/include/poppler/glib/poppler.h:235:0,
from epdfinfo.c:22:
/usr/include/poppler/glib/poppler-annot.h:189:31: note: previous declaration of 'poppler_annot_set_rectangle' was here
void poppler_annot_set_rectangle (PopplerAnnot *poppler_annot,
^
Makefile:392: recipe for target 'epdfinfo.o' failed
make[2]: *_* [epdfinfo.o] Error 1
make[2]: Leaving directory '/tmp/pdf-tools/src'
Makefile:284: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/tmp/pdf-tools/src'
Makefile:561: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Compilation problem with header

Hi,
In Ubuntu 14.10 I get the following error when calling configure:

configure: error: cannot find necessary poppler-private header (see README.org)

I am using the standard poppler libs that come with Ubuntu. Any ideas? Thanks.

(error "Lisp nesting exceeds `max-lisp-eval-depth'")

Hi

I installed pdf-tools and everything seems okay except from when I try to open a pdf file I get the following error message

run-hook-with-args:Lisp nesting exceeds max-lisp-eval-depth'Error during redisplay: (eval (pdf-misc-size-indication)) signaled (error "Invalid image specification: nil") Error during redisplay: (eval (number-to-string (pdf-view-current-page))) signaled (error "Lisp nesting exceedsmax-lisp-eval-depth'")Error during redisplay: (eval (pdf-misc-size-indication)) signaled (error "Invalid image specification: nil")Error during redisplay:
(eval (number-to-string (pdf-view-current-page))) signaled (error "Lisp nesting exceeds max-lisp-eval-depth'")Error during redisplay: (eval (pdf-misc-size-indication)) signaled (error "Invalid image specification: nil")Error during redisplay: (eval (number-to-string (pdf-view-current-page))) signaled (error "Lisp nesting exceedsmax-lisp-eval-depth'")Error during redisplay: (eval (pdf-misc-size-indication)) signaled (error "Invalid image specification: nil")Error during redisplay: (eval (number-to-string (pdf-view-current-page))) signaled (error "Lisp nesting exceeds `max-lisp-eval-depth'")

After the error message I enter pdf-view-mode but when I try to look at the pdf as a picture with C-c C-c the same process repeats itself.

I tried to look up the image specification but with no luck, For completness here is what the info log gave me
21:27:16 number-of-pages:/home/hh/pdf-tools-master/tests/install-test.pdf
21:27:16 OK
3
.
21:27:17 features
21:27:17 OK
case-sensitive-search:writable-annotations:no-markup-annotations
.
21:27:17 outline:/home/hh/pdf-tools-master/tests/install-test.pdf
21:27:17 OK
.

I am using
GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
and ubuntu 14.04

thanks in advance
Hakan

Broken with mismatching pnglib

Using a fresh-built 25.0.5 version neither DocView nor PDF-Tools work. I see the following error:
PNG warning: Application built with libpng-1.6.6 but running with 1.5.17 [8 times]

It doesn't sound fatal, but sure enough nothing shows up but an empty box. This is probably related to issues I'm having with 25.0.5 where I can't install without an older pnglib; I've submitted a bug report for that. Nonetheless, wanted to report this here so that you're aware of it (although it's probably out of your hands).

Error when trying to run make -s under OS X Yosemite

Hi

I am trying to compile pdf-tools from MELPA under OS X, but I have an error message which I can not interpret.
I run the compilation from a terminal.
I have all dependancies installed via homebrew (poppler, zlib, ...).the PKG_CONFIG path is set correctly, everything is found, but I get the following output upon running make -s:

/elpa/pdf-tools-20150204.857/build$ export PKG_CONFIG_PATH=/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
elpa/pdf-tools-20150204.857/build$ make -s

Is case-sensitive searching enabled ?     yes
Is modifying text annotations enabled ?   yes
Is modifying markup annotations enabled ? yes

In file included from epdfinfo.c:20:
In file included from /usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:36:
/usr/local/Cellar/poppler/0.29.0/include/poppler/goo/gtypes.h:34:9: error: unknown type name 'bool'
typedef bool GBool;
        ^
In file included from epdfinfo.c:20:
In file included from /usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:37:
/usr/local/Cellar/poppler/0.29.0/include/poppler/goo/GooString.h:47:1: error: unknown type name 'class'
class GooString {
^
/usr/local/Cellar/poppler/0.29.0/include/poppler/goo/GooString.h:47:16: error: expected ';' after top level declarator
class GooString {
               ^
               ;
In file included from epdfinfo.c:20:
/usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:54:54: error: must use 'enum' tag to refer to type 'ErrorCategory'
extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category,
                                                     ^
                                                     enum
/usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:58:25: error: must use 'enum' tag to refer to type 'ErrorCategory'
extern void CDECL error(ErrorCategory category, Goffset pos, const char *msg, ...) GOOSTRING_FORMAT;
                        ^
                        enum
epdfinfo.c:268:19: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that
      you use mkstemp(3) instead. [-Wdeprecated-declarations]
      filename =  tempnam(NULL, "epdfinfo");
                  ^
/usr/include/stdio.h:391:7: note: 'tempnam' has been explicitly marked deprecated here
char    *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam);
         ^
1 warning and 5 errors generated.
make[2]: *** [epdfinfo-epdfinfo.o] Error 1
make[1]: *** [all] Error 2
make: *** [server/epdfinfo] Error 2

I thought that it is because of an old compiler version which comes with Yosemite, but I tried gcc-4.9 as well:

elpa/pdf-tools-20150204.857/build$ gcc-4.9 --version
gcc-4.9 (Homebrew gcc 4.9.2_1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

elpa/pdf-tools-20150204.857/build$ make CC=gcc-4.9 -s
In file included from /usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:36:0,
                 from epdfinfo.c:20:
/usr/local/Cellar/poppler/0.29.0/include/poppler/goo/gtypes.h:34:9: error: unknown type name 'bool'
 typedef bool GBool;
         ^
In file included from /usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:37:0,
                 from epdfinfo.c:20:
/usr/local/Cellar/poppler/0.29.0/include/poppler/goo/GooString.h:47:1: error: unknown type name 'class'
 class GooString {
 ^
/usr/local/Cellar/poppler/0.29.0/include/poppler/goo/GooString.h:47:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 class GooString {
                 ^
In file included from epdfinfo.c:20:0:
/usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:54:54: error: unknown type name 'ErrorCategory'
 extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category,
                                                      ^
/usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:56:9: error: expected ';', ',' or ')' before 'void'
         void *data);
         ^
/usr/local/Cellar/poppler/0.29.0/include/poppler/error.h:58:25: error: unknown type name 'ErrorCategory'
 extern void CDECL error(ErrorCategory category, Goffset pos, const char *msg, ...) GOOSTRING_FORMAT;
                         ^
epdfinfo.c: In function 'mktempfile':
epdfinfo.c:268:7: warning: 'tempnam' is deprecated (declared at /usr/include/stdio.h:391): This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
       filename =  tempnam(NULL, "epdfinfo");
       ^
make[2]: *** [epdfinfo-epdfinfo.o] Error 1
make[1]: *** [all] Error 2
make: *** [server/epdfinfo] Error 2

Any ideas why I get this error and what I can do to fix it?

Thanks,

Rainer

Have to manually update the `pdf-info-epdfinfo-program' variable after each update of pdf-tools package

Hi,

I have noticed that you have been constantly working on making this package better. The apt-get check is really helpful as it means getting rid of a redundant step where I always hit "n" in the installation process.

Another issue also plagued me.. I am not sure if everyone faced the same problem. Here's a description of what would happen if I had pdf-tools version x installed and I had to upgrade to version y using MELPA:

  1. I'd go to MELPA and choose to upgrade pdf-tools
  2. It would give an error saying that it cannot remove the version x directory of pdf-tools (because the older version directory has the epdfinfo process running in it).
  3. Then on trying M-x pdf-tools-install, it would complain that "pdf-tools-version-x-dir/build" does not exist. This would happen because the package manager already deleted the x version folder and so the old build folder doesn't exist any more and also the pdf-info-epdfinfo-program variable still has the old value.
  4. I would then manually update that variable to point to "pdf-tools-version-y-dir/epdfinfo"
  5. Manually delete "pdf-tools-version-x-dir" after finding the process id of the old epdfinfo by doing lsof +D pdf-tools-version-x-dir and killing that process
  6. Retry M-x pdf-tools-install. This time the build would finish successfully.

To reduce the time of this whole process, I automated the updating of pdf-info-epdfinfo-program using this piece of elisp in my setup.

(defun my/get-latest-pdf-tools-dir ()
  "Get the full directory path of the latest installed version of
pdf-tools package."
  (interactive)
  ;; Get a list of directories and files in `package-user-dir'
  (let ((my/package-dirs (directory-files package-user-dir)))
    ;; `break' implementation in elisp
    ;; http://ergoemacs.org/emacs/elisp_break_loop.html
    (catch 'break
      (dotimes (index (safe-length my/package-dirs))
        (let ((dir-name (pop my/package-dirs))
              full-dir-name)
          ;; (message "%s" dir-name) ; debug
          ;; Find a directory name that matches "pdf-tools-*"
          (when (string-match "pdf\\-tools\\-.*" dir-name)
            (setq full-dir-name (concat package-user-dir "/" dir-name))
            ;; To ensure that the directory is valid, ensure that it
            ;; contains "pdf-tools.el"
            (when (locate-file "pdf-tools.el" (list full-dir-name))
              ;; break the `dotimes' loop on finding this directory
              ;; and return its full path
              (throw 'break full-dir-name))))))))

(defun my/pdf-tools-install ()
  (interactive)
  ;; Update the `pdf-info-epdfinfo-program' variable to point to
  ;; the directory containing the latest version of `pdf-tools'
  (setq pdf-info-epdfinfo-program
        (concat (my/get-latest-pdf-tools-dir) "/epdfinfo"))
  ;; Call the original `pdf-tools-install' function after updating the
  ;; `pdf-info-epdfinfo-program' variable
  (pdf-tools-install))

I still need to do the lsof +D and old directory removal steps but then I do M-x my/pdf-tools-install instead of calling the original function.

I pieced that code together after searching how to do each step in that. So I am sure a more efficient method exists. But it works for me :)

How to make pdf-tools buffer refresh right after corresponding pdf file changes?

First of all, thanks for making such a great tool!

My question is, the buffer updates its content a few seconds after the pdf file changes, is there a variable can make the update immediately?

This problem emerges when I try to use pdf-tools as the pdf viewer of WhizzyTeX, which is an emacs minor mode for real-time incremental viewing of LaTeX documents. WhizzyTeX updates pdf file constantly, so I wish pdf-tools can refresh as soon as possible.

Support retina display on OSX

Documents viewed with pdf-view are much fuzzier than when viewed with doc-view (I have set doc-view-resolution to 300). How can I increase the resolution for pfd-view? (I looked at the pdf-tools and pdf-view customize group but could not find a relevant option.)

Imenu: wrong-type-argument integer-or-marker-p

I'm trying to explore the content of a PDF using ido-goto-symbol (as shown here). This is what I get when picking one of the items shown:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p (0 pdf-outline-imenu-activate-link (goto-dest "Adding JavaScript to HTML" 50 -0.00761)))
  goto-char((0 pdf-outline-imenu-activate-link (goto-dest "Adding JavaScript to HTML" 50 -0.00761)))
  (cond ((overlayp position) (goto-char (overlay-start position))) (t (goto-char position)))
  (let ((ido-mode ido-mode) (ido-enable-flex-matching (if (boundp (quote ido-enable-flex-matching)) ido-enable-flex-matching t)) name-and-pos symbol-names position) (if ido-mode nil (ido-mode 1) (setq ido-enable-flex-matching t)) (while (progn (imenu--cleanup) (setq imenu--index-alist nil) (ido-goto-symbol (imenu--make-index-alist)) (setq selected-symbol (ido-completing-read "Symbol? " symbol-names)) (string= (car imenu--rescan-item) selected-symbol))) (if (and (boundp (quote mark-active)) mark-active) nil (push-mark nil t nil)) (setq position (cdr (assoc selected-symbol name-and-pos))) (cond ((overlayp position) (goto-char (overlay-start position))) (t (goto-char position))))
  (cond ((not symbol-list) (let ((ido-mode ido-mode) (ido-enable-flex-matching (if (boundp (quote ido-enable-flex-matching)) ido-enable-flex-matching t)) name-and-pos symbol-names position) (if ido-mode nil (ido-mode 1) (setq ido-enable-flex-matching t)) (while (progn (imenu--cleanup) (setq imenu--index-alist nil) (ido-goto-symbol (imenu--make-index-alist)) (setq selected-symbol (ido-completing-read "Symbol? " symbol-names)) (string= (car imenu--rescan-item) selected-symbol))) (if (and (boundp (quote mark-active)) mark-active) nil (push-mark nil t nil)) (setq position (cdr (assoc selected-symbol name-and-pos))) (cond ((overlayp position) (goto-char (overlay-start position))) (t (goto-char position))))) ((listp symbol-list) (let ((--dolist-tail-- symbol-list) symbol) (while --dolist-tail-- (setq symbol (car --dolist-tail--)) (let (name position) (cond ((and ... ...) (ido-goto-symbol symbol)) ((listp symbol) (setq name ...) (setq position ...)) ((stringp symbol) (setq name symbol) (setq position ...))) (if (or (null position) (null name) (string= ... name)) nil (if (member name symbol-names) symbol-names (setq symbol-names ...)) (let* (...) (if ... name-and-pos ...)))) (setq --dolist-tail-- (cdr --dolist-tail--))))))
  ido-goto-symbol()
  funcall-interactively(ido-goto-symbol)
  #<subr call-interactively>(ido-goto-symbol nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> ido-goto-symbol nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (ido-goto-symbol nil nil))
  call-interactively(ido-goto-symbol nil nil)
  command-execute(ido-goto-symbol)

I'm using GNU Emacs 25.0.50.1

Feature request: continuous view

Is it feasible to implement viewing the top of the next page when you reach the end of the current page? While reading e-books and scrolling down with Space as you advance it is unpleasant that when the bottom of the page is reached the line that was previously at the bottom of the screen now it can be located anywhere depending on the zoom level etc. Other pdf viewers solve this by showing the top of the next page below the current one and thus always advancing the same amount of space on each scroll operation.

Ditto for scrolling up.

"Revert buffer" on change does nothing

Writing in Tex I often reproduce the pdf file, which is already open in another buffer. Upon using `tex-view', which is set to switch to my pdf viewer (in this case pdf-tools) I'm prompted, "Revert buffer from file ? (yes or no)". I happily answer "yes". However, regardless of what I answer, it doesn't actually DO anything; I am forced to hit "g" as soon as I load the buffer to actually view the new PDF.

Using Emacs 25.0.5 with the latest pdf-tools package (as of 2015.2.13)

Customizable background/text colors

Other poppler-based PDF readers (Okular, qpdfview) have the capability of selectable background/text colors for the PDF content, which is a must for night reading. Is it possible to implement that feature on pdf-tools?

Addition to Documentation

I just installed / updated pdf-tools on melpa and it worked fine. To set the PKG_CONFIG_PATH from emacs, I just did in the scratch buffer and it compiled and installed fine:

(Setenv "PKG_CONFIG_PATH"
        (concat
         "/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:"
         (getenv "PKG_CONFIG_PATH")
         )
        )

Maybe this cold be added to the README?

Just one remark: the lib part depends obviously on the version installed. But as there is a system version of lib, the by using home-brew installed version is not linked into the /usr/local/lib/pkgconfig path. Therefore it needs to be added explicitly and the b=version obviously can change.

Thanks,

Rainer

Mark with keyboard

It would be nice if it was possible to select regions with the keyboard. I guess that corresponds to having a cursor. For instance, it would be much easier to select a region for highlight with usual navigation keys compared to the mouse. I don't know if this is feasible, though.

Kill all pdf-tools buffer on quit

Whenever I press Q in the PDFView buffer, the pdf-info-log buffer is still there. Is there a way to get rid of that upon pressing Q?

Add highlighting for selection

This is awesome. I always wanted something like this in Emacs for a long time ago. Thanks for creating this.

Currently, we can drag and select text to copy. But it gives no highlighting, which could be hard to keep track of selection. Would be cool if we can have this feature.

How can I remove an annotation?

I added an annotation to a PDF and saved it. Later I reopened the PDF and tried to delete the annotation but couldn't find a way to do that.

BTW, thank you for pdf-tools. It's a great package and will make my life easier.

Cannot build in Mac OS X.

Here is the log:

Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
gcc -DHAVE_CONFIG_H -I. -w -g -O2 -MT libsynctex_a-synctex_parser.o -MD -MP -MF .deps/libsynctex_a-synctex_parser.Tpo -c -o libsynctex_a-synctex_parser.o test -f 'synctex_parser.c' || echo './'synctex_parser.c
mv -f .deps/libsynctex_a-synctex_parser.Tpo .deps/libsynctex_a-synctex_parser.Po
gcc -DHAVE_CONFIG_H -I. -w -g -O2 -MT libsynctex_a-synctex_parser_utils.o -MD -MP -MF .deps/libsynctex_a-synctex_parser_utils.Tpo -c -o libsynctex_a-synctex_parser_utils.o test -f 'synctex_parser_utils.c' || echo './'synctex_parser_utils.c
mv -f .deps/libsynctex_a-synctex_parser_utils.Tpo .deps/libsynctex_a-synctex_parser_utils.Po
rm -f libsynctex.a
ar cru libsynctex.a libsynctex_a-synctex_parser.o libsynctex_a-synctex_parser_utils.o
ranlib libsynctex.a
gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/glib/2.42.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.42.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -D_REENTRANT -I/usr/local/Cellar/poppler/0.28.1/include/poppler/glib -I/usr/local/Cellar/poppler/0.28.1/include/poppler -I/usr/local/Cellar/cairo/1.14.0/include/cairo -I/usr/local/Cellar/glib/2.42.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.42.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pixman/0.32.6/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.11.1/include -I/usr/local/Cellar/freetype/2.5.3_1/include/freetype2 -I/usr/local/Cellar/libpng/1.6.13/include/libpng16 -I/opt/X11/include -I/usr/local/Cellar/poppler/0.28.1/include/poppler -g -O2 -MT epdfinfo-epdfinfo.o -MD -MP -MF .deps/epdfinfo-epdfinfo.Tpo -c -o epdfinfo-epdfinfo.o test -f 'epdfinfo.c' || echo './'epdfinfo.c
In file included from epdfinfo.c:20:
In file included from /usr/local/Cellar/poppler/0.28.1/include/poppler/error.h:36:
/usr/local/Cellar/poppler/0.28.1/include/poppler/goo/gtypes.h:34:9: error: unknown type name 'bool'
typedef bool GBool;
^
In file included from epdfinfo.c:20:
In file included from /usr/local/Cellar/poppler/0.28.1/include/poppler/error.h:37:
/usr/local/Cellar/poppler/0.28.1/include/poppler/goo/GooString.h:47:1: error: unknown type name 'class'
class GooString {
^
/usr/local/Cellar/poppler/0.28.1/include/poppler/goo/GooString.h:47:16: error: expected ';' after top level declarator
class GooString {
^
;
In file included from epdfinfo.c:20:
/usr/local/Cellar/poppler/0.28.1/include/poppler/error.h:54:54: error: must use 'enum' tag to refer to type 'ErrorCategory'
extern void setErrorCallback(void (cbk)(void *data, ErrorCategory category,
^
enum
/usr/local/Cellar/poppler/0.28.1/include/poppler/error.h:58:25: error: must use 'enum' tag to refer to type 'ErrorCategory'
extern void CDECL error(ErrorCategory category, Goffset pos, const char *msg, ...) GOOSTRING_FORMAT;
^
enum
epdfinfo.c:373:3: warning: 'g_type_init' is deprecated [-Wdeprecated-declarations]
g_type_init ();
^
/usr/local/Cellar/glib/2.42.0/include/glib-2.0/gobject/gtype.h:679:23: note: 'g_type_init' has been explicitly marked deprecated here
void g_type_init (void);
^
epdfinfo.c:2199:19: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
filename = tempnam(NULL, "epdfinfo");
^
/usr/include/stdio.h:389:7: note: 'tempnam' has been explicitly marked deprecated here
char *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam);
^
2 warnings and 5 errors generated.
make[2]: *
* [epdfinfo-epdfinfo.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

I think it should be g++ instead of gcc.

epdfinfo executable not found

I am on Debian sid, using GNU Emacs 25.0.50.1.
If I use your package by cloning the repo and building it following your instructions, everything works fine.
If I try to use the version now on MELPA it doesn't work. It is looking for epdfinfo executable and can't find it.
If you need me to do other tests or require other informations to better debug the issue please let me know.

Some PDFs cause a full emacs freeze

Also posted to http://permalink.gmane.org/gmane.emacs.help/102470

Attempting to open the following pdf (and I hate to think what other ones) with PDF Tools causes my emacs to freeze without listed error and it is unresponsive to C-g. I have to kill the process, which causes all kinds of problems. So far I'm not sure why; other PDFs work great.

http://orys.us/breaksemacspdf

I'm running PDF-Tools 20150129.1435 from MELPA, with GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 2014-09-30 on buildvm-10.phx2.fedoraproject.org

Continuous view

Great piece of software! Thanks for it!
A question though: I cannot get continuous view mode working (as in DocView). The setting is on in the customization menu, but I am not able to get it working. Any ideas?

"The epdfinfo server quit, restart it?"

Hi,

I've compiled poppler 0.28 from source and installed it; i've also compiled the pdf-tools and installed it in emacs 24.4.

When I run pdf-tools-install, I get the message "The epdfinfo server quit, restart it?". Pressing "y" displays the message again.

PDFs are still opening in docview.

Any ideas?

problems running with poppler 0.29.0-1

I get the following error on Ubuntu 14.04.1 LTS x86_64 with
pdf-tools-20150219.2326 from melpa.

pdf-info-query: The epdfinfo server quit unexpectedly.
The epdfinfo server quit, restart it ? y
Error during redisplay: (eval (pdf-misc-size-indication)) signaled (error "Invalid image specification: nil") [2 times]

This started after I built and installed poppler-0.29.0 from source, and
built epdfinfo using this version. If I build epdfinfo with the system
libpoppler-glib8 (0.24.5), things work fine, but of course, highlighting,
squiggly, etc. are not supported.

Aside, I had to do the following to build the server:

export poppler_glib_CFLAGS="-I/usr/include/poppler/glib -I/usr/include/cairo"
export poppler_glib_LIBS="-L/usr/lib -lpoppler -lcairo -lcairo-gobject -lpoppler-glib -lpoppler-cpp -lgobject-2.0 -lglib-2.0"

Finally, thanks for a wonderful tool!

scroll-other-window doesn't work

When reading the PDF below and writing above, found that scroll-other-window (C-M-v) will scroll down to the end of the page and then, rather than going to the next page, will just bounce to the top of the same page again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.