Home

Awesome

EAF PDF Viewer

<p align="center"> <img width="800" src="./screenshot.png"> </p>

PDF Viewer application for the Emacs Application Framework.

Load application

Install EAF first, then add below code in your emacs config:

(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/")
(require 'eaf)
(require 'eaf-pdf-viewer)

LaTeX config

(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex --synctex=1%(mode)%' %t" TeX-run-TeX nil t))
(add-to-list 'TeX-view-program-list '("eaf" eaf-pdf-synctex-forward-view))
(add-to-list 'TeX-view-program-selection '(output-pdf "eaf"))

Double click the left button to edit backward.

<p align="center"> <img width="800" src="./latex_screenshot.gif"> </p>

Translate current word

Double click the right button to edit backward.

You need re-implement eaf-translate-text yourself.

<img width="1214" alt="SCR-20230805-ofva" src="https://github.com/emacs-eaf/eaf-pdf-viewer/assets/1028971/67a39c19-5a70-4804-9160-aedf1a56f3ee">

The translation tool used in the screenshot is: popweb

Dark mode

Default set background color to emacs-background-color

Override this behavior

(setq eaf-pdf-dark-mode nil)

Dependency List

PackageDescription
python-pymupdfPDF rendering engine
libreofficeConvert doc file to pdf, optional

The keybinding of EAF PDF Viewer.

KeyEvent
jscroll_up
<down>scroll_up
C-nscroll_up
kscroll_down
<up>scroll_down
C-pscroll_down
hscroll_left
<left>scroll_left
C-bscroll_left
lscroll_right
<right>scroll_right
C-fscroll_right
SPCscroll_up_page
bscroll_down_page
C-vscroll_up_page
M-vscroll_down_page
ttoggle_read_mode
0zoom_reset
=zoom_in
-zoom_out
gscroll_to_begin
Gscroll_to_end
pjump_to_page
Pjump_to_percent
[save_current_pos
]jump_to_saved_pos
itoggle_inverted_mode
C-itoggle_inverted_image_mode
mtoggle_mark_link
fjump_to_link
M-wcopy_select
C-ssearch_text_forward
C-rsearch_text_backward
xclose_buffer
zeaf-ocr-buffer
C-<right>rotate_clockwise
C-<left>rotate_counterclockwise
M-hadd_annot_highlight
M-uadd_annot_underline
M-sadd_annot_squiggly
M-dadd_annot_strikeout_or_delete_annot
M-eadd_annot_text_or_edit_annot
M-ptoggle_presentation_mode
Jselect_left_tab
Kselect_right_tab
oeaf-pdf-outline
Oeaf-pdf-outline-edit
Ttoggle_trim_white_margin