Skip to content

Commit

Permalink
Add section about pymupdf-tq branch to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dalanicolai committed Dec 17, 2021
1 parent cb21752 commit 59f4b86
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,58 @@
[[https://stable.melpa.org/#/pdf-tools][http://stable.melpa.org/packages/pdf-tools-badge.svg]]
[[https://melpa.org/#/pdf-tools][http://melpa.org/packages/pdf-tools-badge.svg]] [[https://ci.appveyor.com/project/vedang/pdf-tools][https://ci.appveyor.com/api/projects/status/yqic2san0wi7o5v8/branch/master?svg=true]]

** About this pymupdf-tq branch
In this branch an alternative pdf-tools server, which is [[https://pymupdf.readthedocs.io/en/latest/][PyMuPDF]] based and
accordingly written in python, is being developed. The goal for of this
branch is to 'lower the bar' for maintaining and extending pdf-tools. Now the
rather 'demanding' requirement of having a very good knowledge of the C
programming language for extending the pdf-tools server, now gets 'lowered'
to a requirement of merely having a very limited knowledge of the python
programming language. In combination with some moderate knowledge of Emacs
lisp for extending the client, this opens the possibility to quite
straightforwardly implement line and arrow annotation features. Additionally,
with slightly more effort, an ink/freehand annotation feature could be
implemented. Enthusiastic hackers, could add pdf-form support and, as some
users have requested, keyboard navigation/selection support (implementing a
cursor).

With the help of the more then excellent [[https://pymupdf.readthedocs.io/en/latest/][PyMuPDF documentation]], writing the
python code for these features should be quite straightforward. However
writing the elisp/client code could be tricky. But enthusiastic hackers can
always count on help from the community. A least the author of the initial
code for this backend (and the [[https://elpa.gnu.org/devel/sketch-mode.html][sketch-mode]] package and several other Emacs
packages), generously offers his full assistance.

If you would like to hack on pdf-tools/this backend, then a kinds of
development tips and comments can be found in [[../wiki/PyMuPDF-backend][the wiki section]].

*** Usage
Install this branch using a Quelpa recipe. In Spacemacs I am using the
following line of code to install pdf-tools from this branch of the
repository:
#+begin_src emacs-lisp :tangle yes
(pdf-tools :location (recipe
:fetcher github
:repo "dalanicolai/pdf-tools"
:branch "pymupdf-tq"
:files ("lisp/*.el"
"README"
"pymupdf-tq-server/*.py"
("build" "Makefile")
("build" "server")
(:exclude "lisp/tablist.el" "lisp/tablist-filter.el"))))
#+end_src
You could also simply install the ~vimura.py~ file directly in your pdf-tools
directory, but I am not sure if all functions will work correctly (in
particular the search functionality, as I have made a small (temporary?)
change to ~pdf-isearch.el~)

Install the [[https://pypi.org/project/PyMuPDF/][PyMuPDF]], [[https://pypi.org/project/Pillow/][Pillow]] and [[https://pypi.org/project/pytz/][pytz]] python packages in your preferred python
environment.

Finally after loading pdf-tools, select the vimura server via ~M-x
pdf-tools-toggle-server~.

** About this package
PDF Tools is, among other things, a replacement of DocView for PDF
files. The key difference is that pages are not pre-rendered by
Expand Down

0 comments on commit 59f4b86

Please sign in to comment.