llpp

llpp is a lightweight, fast and featureful PDF, EPUB, XPS and CBZ viewer based on MuPDF.

Warning: In the git repository the files were deleted and replaced, but older commits still retain all previous code. https://repo.or.cz/llpp.git/tree/04431d79a40dcc0215f87a2ad577f126a85c1e61
Note: The repo is forked and maintained in AUR. https://github.com/criticic/llpp

Installation

Install the llppAUR package, or llpp-gitAUR for the development version.

Usage

llpp uses keyboard shortcuts and the mouse to navigate through a document. By default, pressing F1 or h will bring up a help page where all other key bindings are described.

Check out the following page for the full help text.

Configuration

llpp uses a configuration file to store settings: $XDG_CONFIG_HOME/llpp.conf or . This file stores the following:

  1. Application defaults.
  2. File-by-file user preferences (e.g. the last page viewed).

Per-document options

Pressing will enter information mode, where you can examine and modify display settings for the current document.

Alternately, pressing (where is one of the tunable options shown in the help screen) allows you to set a single setting directly.

UI Font

One can set the font used by llpp by indicating the size and filename in the configuration. For example:

<llppconfig>
  <ui-font size='16'><![CDATA[/usr/share/fonts/TTF/DejaVuSansMono.ttf]]></ui-font>
  <defaults ... >
  ...
  </defaults>
</llppconfig>

Custom key bindings

It is possible to configure key bindings. For example, to disable exiting llpp, add the keymap element in between the defaults tags as follows:

<llppconfig>
  <defaults ... >
    <keymap mode='view'>

<map in='esc' out=''/>

    </keymap>
  </defaults>
</llppconfig>

More examples can be found in llpp's example file keys.txt. For vi-like key bindings, see this example.

Save annotations to PDF

You can annotate a PDF file by right clicking while holding . To allow saving of annotations, add

savepath-command='echo %s'

to your . After annotating the file, save the changes by pressing . This s the current PDF file path to the option.

By default, llpp will not open links in the default browser. The uri-launcher option in is responsible for handling this action. To open links in your default web browser, set it to:

uri-launcher='xdg-open "%s"'

Tips and Tricks

Reload File

A document can be reloaded in three ways:

  • Pressing the r key
  • Sending a HUP signal to the llpp process
$ killall -SIGHUP llpp
  • Using the "remote" interface (see below)

Multiple Columns

For side-by-side 2-page viewing, press (or set to in info mode).

If the page offset is wrong (left-hand page showing on the right-hand side), set columns to .

A unique feature of llpp is being able to split a single page down the middle by setting columns to . Use to split a 3-column document.

Remote Interface

The following commands will setup the remote interface and use it to reload the file "image.pdf".

$ mkfifo /tmp/llpp.remote
$ llpp -remote /tmp/llpp.remote image.pdf & disown
$ sleep 1
$ echo reload >/tmp/llpp.remote

There are eight remote commands:

  • - reload
  • - quit
  • goto <page-number> <x-coordinate> <y-coordinate> - goto
  • - goto
  • gotor <file-name> <page-number> - goto other document
  • - goto named destination within the other document
  • - draw a rectangle
  • - raise and switch to llpp's window

Inverse search using Synctex and Vim/Emacs

To use the synctex capability of llpp, add the line bellow to your under the defaults tag:

<defaults
    ...
    synctex-command='SyncTeX-inverse.sh'
    ...>
    ...
</defaults>

where is the script bellow

#!/bin/bash
pdf_file=$1
page=$(($2 + 1)) # The page number star at zero in llpp
x=$3
y=$4

# for vim
synctex edit -o "$page:$x:$y:$pdf_file" \
       -x "gvim --servername synctex --remote-wait-silent +%{line} '%{input}'"

# for emacs
# synctex edit -o "$page:$x:$y:$pdf_file" -x "emacsclient +%{line} '%{input}'" 

Make sure is an executable script and add it to your environment variable. To use the command you will need package from the official Arch repositories.

gollark: Well, that's *wrong*, because it is not showing number of photons as far as I can see but the total energy of all those photons.
gollark: You said how many, which is in fact quantity.
gollark: The total energy of the photons is *not* the same as the quantity of them.
gollark: It looks like it's showing the total energy of the photons of each wavelength, which isn't the same.
gollark: I don't think so.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.