lpdf - little pdf viewer

1. Building

$ CXXFLAGS=-O2 make

Dependencies are Xlib and poppler.

Lpdf uses an internal, unstable poppler api, so it might have problems with
different poppler versions. It was built and tested with poppler-21.03.0.

2. Installation

It's just two files, copy them (requires write access to /usr/local):

$ cp ./lpdf /usr/local/bin
$ cp ./lpdf.1 /usr/local/share/man/man1

Or use other locations (e.g. ~/bin and ~/.local/share/man/man1).

3. Zsh-completion

Create file _lpdf in directory included in $fpath:

$ cat <<EOF >_lpdf
#compdef lpdf
_pdf
EOF

4. Starting lpdf in tabbed

If you want to start lpdf in new tab, use lpdf -w $XEMBED ... from within
terminal in tabbed. Also, you can use simple script to automate that:

$ cat <<EOF >lpdf-open
#!/bin/sh

args=
if [[ "\$XEMBED" != "" ]]; then
        args="-w \$XEMBED"
fi

lpdf \$args "\$@" &
EOF
