Author |
Message |
Iguleder

Joined: 11 Aug 2009 Posts: 2031 Location: Israel, somewhere in the beautiful desert
|
Posted: Fri 08 Jul 2011, 09:16 Post subject:
Zathura PDF viewer Subject description: Minimalistic PDF viewer |
|
Here's the best PDF viewer I've ever seen: Zathura.
Very minimalistic, very very very lightweight and awesome for small screens.
Description |
|

Download |
Filename |
zathura-0.0.8.3.pet |
Filesize |
30.27 KB |
Downloaded |
1107 Time(s) |
Description |
sources
|

Download |
Filename |
zathura-0.0.8.3.tar.gz |
Filesize |
33.58 KB |
Downloaded |
842 Time(s) |
_________________ My homepage
My GitHub profile
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Fri 08 Jul 2011, 10:00 Post subject:
zathura documentation |
|
Dear Iguleder,
Many thanks for this little gem. It actually works nicely, but you have to know the keystrokes, which might not be obvious. To that end, here is a little pdf file made from the man page. The main thing to remember are the keys "a" and "s" (zoom to fit and zoom to fit respectively).
With kind regards,
vovchik
PS. It compiles nearly instantly with a simple make file.
Description |
|

Download |
Filename |
zathura.pdf.tar.gz |
Filesize |
25.86 KB |
Downloaded |
906 Time(s) |
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 11193 Location: Ontario Canada,Sydney Australia
|
Posted: Fri 08 Jul 2011, 10:08 Post subject:
|
|
sounds like someone should take this on as a project and add a simple gui with zoom/print screen, file open dialog, next and previous page and that's about it
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games 
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 12 Jul 2011, 13:42 Post subject:
Zathura PDF viewer |
|
ttuuxxx wrote: | sounds like someone should take this on as a project and add a simple gui with zoom/print screen, file open dialog, next and previous page and that's about it
ttuuxxx |
Maybe I could be the one if it worked in wary
Code: | # zathura
zathura: error while loading shared libraries: libpoppler-glib.so.4: cannot open shared object file: No such file or directory
# |
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 11193 Location: Ontario Canada,Sydney Australia
|
Posted: Tue 12 Jul 2011, 15:22 Post subject:
Re: Zathura PDF viewer |
|
L18L wrote: | ttuuxxx wrote: | sounds like someone should take this on as a project and add a simple gui with zoom/print screen, file open dialog, next and previous page and that's about it
ttuuxxx |
Maybe I could be the one if it worked in wary
Code: | # zathura
zathura: error while loading shared libraries: libpoppler-glib.so.4: cannot open shared object file: No such file or directory
# |
|
just locate libpoppler-glib.so and make a system link called libpoppler-glib.so.4 and iy should work.
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games 
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Tue 12 Jul 2011, 15:58 Post subject:
Re: Zathura PDF viewer Subject description: libpoppler-glib.so |
|
ttuuxxx wrote: | just locate libpoppler-glib.so and make a system link called libpoppler-glib.so.4 and iy should work. |
Code: | # ln -s /usr/lib/libpoppler-glib.so.5.0.0 /usr/lib/libpoppler-glib.so.4 |
Thank you
that was in wary511q
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Thu 14 Jul 2011, 15:15 Post subject:
Zathura PDF viewer Subject description: simple gui open file and shortcuts |
|
simplePDFreader
download to /root/my-applications/bin
dependency: yad (pet-packages-common: yad and yad-nls)
Code: | #!/bin/sh
#
# simplePDFreader: gui for zathura pdf reader
# 2011-07-14 2011-07-17 L18L seaside
# required: yad version >= 0.9.0
#
RESTART=$0
file=$1 # file to read
#
export TEXTDOMAIN=simple_yad
export OUTPUT_CHARSET=UTF-8
#
title=$(gettext "simplePDFreader zathura")
zathura_manual=`find -name zathura.pdf` # <smile>
echo $zathura_manual
shortcuts="<b> $(gettext 'Shortcuts (^ is Ctrl)') </b>
<span color='red'>J</span> $(gettext 'Go to next page')
K $(gettext 'Go to previous page')
h $(gettext 'Scroll to the left')
k $(gettext 'Scroll upwards')
j $(gettext 'Scroll downwards')
^f $(gettext 'Scroll page down')
^b $(gettext 'Scroll page up')
^d $(gettext 'Scroll half a page down')
^u $(gettext 'Scroll half a page up')
l $(gettext 'Scroll to the right')
<span color='red'>+</span> $(gettext 'Zoom in')
- $(gettext 'Zoom out')"
exitus(){
kill `cat /tmp/simplePDFreader_PID` 2> /dev/null
kill `cat /tmp/simplePDFreader_mPID` 2> /dev/null
exit 0
}
select_directory()
{
dir=$(yad --title="$title" \
--width="450" \
--height="300" \
--separator="" \
--text=" <span stretch='expanded' color='#330099'>$(gettext 'select the <b>directory</b> where to search for PDF files</span>')" \
--file-selection \
--directory \
--filename="/usr/share/examples/" \
)
[[ $? -eq 1 ]] && exitus
list_pdfs_of_dir $dir
}
list_pdfs_of_dir()
{
dir=$1
file=""
until [ "$file" != "" ]
do
file=$(find $1 -name '*.pdf' | yad --title="$title" \
--height="250" \
--separator="" \
--text=" <span stretch='expanded' color='#009933'><i>$(gettext 'Select the <b>file</b> you want to read:</i></span>')" \
--list --column="PDF files in your $dir directory" \
--button="gtk-go-up:3" \
--button="gtk-find:2" \
--button="gtk-help:4" \
--button="gtk-quit:1" \
--button="gtk-ok:0" \
)
result=$?
case $result in
1) exitus ;;
2) select_directory ;;
3) dir=`dirname $dir` ; list_pdfs_of_dir $dir ;;
4) if [ "$zathura_manual" != "" ]
then
shortcuts
zathura "$zathura_manual" &
mPID=$!
echo $mPID > /tmp/simplePDFreader_mPID
else yad --button="gtk-ok" --text="Sorry, missing zathura.pdf"
fi
;;
esac
done
echo "file=$file"
[ "$file" = "" ] && select_directory
}
shortcuts()
{
if [ `ps | grep 'yad --title=simplePDFreader' | wc -l` -lt 2 ]
then
## Shortcuts top left sticky
yad --title="simplePDFreader" --text="$shortcuts" --no-buttons --geometry="80x200+0+0" --sticky &
sPID=$!
echo $sPID > /tmp/simplePDFreader_PID
fi
}
## if no argument we start showing a list of pdf files under $HOME
[ ! -f "$file" ] && list_pdfs_of_dir $HOME
shortcuts
## lauch viewer
echo lauch viewer $file
zathura "$file"
# continue
file="`echo $file | tr ' ' '_'`" # just to make sure that dirname will work
echo "file=$file"
dir=`dirname $file`
[ "$dir" = "" ] && dir=/usr/share # there are some pdf's
echo "continue dir=$dir/"
list_pdfs_of_dir "$dir/"
$RESTART "$file"
#end of script |
 |
Description |
- |
Filesize |
20.72 KB |
Viewed |
8249 Time(s) |

|
Last edited by L18L on Sun 17 Jul 2011, 08:29; edited 3 times in total
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 14 Jul 2011, 18:16 Post subject:
|
|
L18L,
That's a good start for a Zathura PDF viewer gui.
There are a few items that you might want to add.
If you use this following form of directory selection, you won't need two dialogs, be able to go to any directory and, additionally, you'll get a *.pdf filter.
Code: | yad --file-selection --file-filter="Pdf files | *.pdf" |
Also, the font command is "--font=" (not "--fontname=") and the "on-top" command doesn't work, but can be utilized by making a "--class" with a matching entry in JWM.
Cheers,
s
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Fri 15 Jul 2011, 16:42 Post subject:
Zathura PDF viewer Subject description: simpleGUI |
|
seaside,
thank you for your comment
on-top does not work
fontname does not work -> it is used for preselecting a font in fontselect
Thanks for explaining the filter thing
But I want 2 dialogs:
Starting the script with a file, after closing zathura you get a list of pdf files to choose from
because I think this is the intuitive way to continue.
Another choice is using the find button and here see only directories.
The default is now /usr/share/examples where there are pdf´s.
Starting without a file, all pdf´s under $HOME are listed.
I am going to overwrite the above script now. go-up button added.
Description |
script see 2 posts up |
Filesize |
25.66 KB |
Viewed |
7156 Time(s) |

|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4989 Location: Ontario
|
Posted: Sat 16 Jul 2011, 11:53 Post subject:
|
|
I put Zathura in Right-click-4.9.7
for Lucid Puppyand Wary
To remind people of the key shortcuts I put
'a' and 's' in the right click menu
For more info
http://www.murga-linux.com/puppy/viewtopic.php?t=67013
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Sat 16 Jul 2011, 17:03 Post subject:
Re: Zathura PDF viewer Subject description: simpleGUI |
|
L18L wrote: |
Starting the script with a file, after closing zathura you get a list of pdf files to choose from
because I think this is the intuitive way to continue.
Another choice is using the find button and here see only directories.
The default is now /usr/share/examples where there are pdf´s.
. |
L18L,
I have tested this with Yad 0.9.0 on pup431 (would have to upgrade GTK to compile the latest Yad ) and the "find" button doesn't produce anything. The reason is that there are several options used which are newer and not in Yad 0.9.0.
What version of Yad are you using?
Cheers,
s
EDIT:
Actually, if the following change is made, it works as you described. Change "--file' to "--file-selection" and delete "--dclick-action" in the "select_directory" function. It would now read -
Code: | select_directory()
{
dir=$(yad --title="$title" \
--width="450" \
--height="300" \
--separator="" \
--text=" <span stretch='expanded' color='#330099'>$(gettext 'select the <b>directory</b> where to search for PDF files</span>')" \
--file-selection \
--directory \
--filename="/usr/share/examples/" \
)
[[ $? -eq 1 ]] && exitus
list_pdfs_of_dir $dir
} |
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Sun 17 Jul 2011, 08:25 Post subject:
Zathura PDF viewer Subject description: gui, yad version |
|
seaside,
thank you. It is very good making this script workable in yad 0.9, too
I have been overwriting the script (see 5 posts above) now,
added a help button
which launches vovchik´s zathura.pdf
if available anywhere on the system.
vovchik,
where did you get the man page from?
(I think the help button should point to the man page directly)
Thanks for testing and feedback
l
Description |
script see 5 posts above |
Filesize |
16.18 KB |
Viewed |
7156 Time(s) |

|
Last edited by L18L on Sun 17 Jul 2011, 08:55; edited 1 time in total
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Sun 17 Jul 2011, 08:47 Post subject:
zathura manual |
|
Dear L18L,
I got the manpage from the tarball and made my own pdf The archived manpage is attached. The tarball is here: https://pwmt.org/projects/zathura/.
With kind regards,
vovchik
Description |
|

Download |
Filename |
zathura.1.tar.gz |
Filesize |
1.67 KB |
Downloaded |
1088 Time(s) |
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3431 Location: www.eussenheim.de/
|
Posted: Sun 17 Jul 2011, 09:20 Post subject:
zathura manual |
|
Dear vovchik,
thank you very much making me RTFM (read the Fine manual)
Moved zathura.1.gz to /usr/share/man/1 and
works.
Kind regards
l
Quote: | Version 0.0.8.4 fixes several bugs |
|
Back to top
|
|
 |
keniv
Joined: 06 Oct 2009 Posts: 490 Location: Scotland
|
Posted: Mon 18 Jul 2011, 18:37 Post subject:
|
|
Hi L18L
I cannot get your gui script to work on 525. I am not sure I am doing the right thing. This is what I have done. I copied your script to a new file in my-applications/bin. I made this file executable. When I click on this file I get a small box With "simple pdf read" and a cancel and ok box. This box does nothing and cannot be closed or killed. To get rid of it I have to restart X. I am using the version of yad in your link. Bellow is the output when I run the script in a terminal then press the ok button on the box that appears.
.
Code: | /root/my-applications/bin/NewFile: line 70: --height=250: command not found
/root/my-applications/bin/NewFile: line 71: --separator=: command not found
/root/my-applications/bin/NewFile: line 72: --text= <span stretch='expanded' color='#009933'><i>Select the <b>file</b> you want to read:</i></span>: No such file or directory
/root/my-applications/bin/NewFile: line 73: --list: command not found
/root/my-applications/bin/NewFile: line 74: --button=gtk-go-up:3: command not found
/root/my-applications/bin/NewFile: line 75: --button=gtk-find:2: command not found
/root/my-applications/bin/NewFile: line 76: --button=gtk-help:4: command not found
/root/my-applications/bin/NewFile: line 77: --button=gtk-quit:1: command not found
/root/my-applications/bin/NewFile: line 78: --button=gtk-ok:0: command not found |
Zathura itself is working ok. I really like it.
I would appreciate any help you can give me.
Regards,
Ken.
|
Back to top
|
|
 |
|