Zathura PDF viewer
- Iguleder
- Posts: 2026
- Joined: Tue 11 Aug 2009, 09:36
- Location: Israel, somewhere in the beautiful desert
- Contact:
Zathura PDF viewer
Here's the best PDF viewer I've ever seen: Zathura.
Very minimalistic, very very very lightweight and awesome for small screens.
Very minimalistic, very very very lightweight and awesome for small screens.
- Attachments
-
- zathura-0.0.8.3.pet
- (30.27 KiB) Downloaded 1417 times
-
- zathura-0.0.8.3.tar.gz
- sources
- (33.58 KiB) Downloaded 1136 times
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
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.
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.
- Attachments
-
- zathura.pdf.tar.gz
- (25.86 KiB) Downloaded 1175 times
- ttuuxxx
- Posts: 11171
- Joined: Sat 05 May 2007, 10:00
- Location: Ontario Canada,Sydney Australia
- Contact:
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
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Zathura PDF viewer
Maybe I could be the one if it worked in waryttuuxxx 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
Code: Select all
# zathura
zathura: error while loading shared libraries: libpoppler-glib.so.4: cannot open shared object file: No such file or directory
#
- ttuuxxx
- Posts: 11171
- Joined: Sat 05 May 2007, 10:00
- Location: Ontario Canada,Sydney Australia
- Contact:
Re: Zathura PDF viewer
just locate libpoppler-glib.so and make a system link called libpoppler-glib.so.4 and iy should work.L18L wrote:Maybe I could be the one if it worked in waryttuuxxx 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
ttuuxxxCode: Select all
# zathura zathura: error while loading shared libraries: libpoppler-glib.so.4: cannot open shared object file: No such file or directory #
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Zathura PDF viewer
ttuuxxx wrote:just locate libpoppler-glib.so and make a system link called libpoppler-glib.so.4 and iy should work.
Code: Select all
# ln -s /usr/lib/libpoppler-glib.so.5.0.0 /usr/lib/libpoppler-glib.so.4
that was in wary511q
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Zathura PDF viewer
simplePDFreader
download to /root/my-applications/bin
dependency: yad (pet-packages-common: yad and yad-nls)
download to /root/my-applications/bin
dependency: yad (pet-packages-common: yad and yad-nls)
Code: Select all
#!/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
- Attachments
-
- zathura-gui.png
- -
- (20.72 KiB) Downloaded 9003 times
Last edited by L18L on Sun 17 Jul 2011, 12:29, edited 3 times in total.
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.
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
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: Select all
yad --file-selection --file-filter="Pdf files | *.pdf"
Cheers,
s
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Zathura PDF viewer
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.
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.
- Attachments
-
- zathura-gui2.png
- script see 2 posts up
- (25.66 KiB) Downloaded 7804 times
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
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
Re: Zathura PDF viewer
L18L,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.
.
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 all
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
}
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Zathura PDF viewer
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
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
- Attachments
-
- zathura-gui3.png
- script see 5 posts above
- (16.18 KiB) Downloaded 7858 times
Last edited by L18L on Sun 17 Jul 2011, 12:55, edited 1 time in total.
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
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
- Attachments
-
- zathura.1.tar.gz
- (1.67 KiB) Downloaded 1350 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
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
thank you very much making me RTFM (read the Fine manual)
Moved zathura.1.gz to /usr/share/man/1 and
Code: Select all
man zathura
Kind regards
l
Version 0.0.8.4 fixes several bugs
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.
.
Zathura itself is working ok. I really like it.
I would appreciate any help you can give me.
Regards,
Ken.
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: Select all
/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
I would appreciate any help you can give me.
Regards,
Ken.
GUI for zathura
http://www.murga-linux.com/puppy/viewto ... 268#545268
I made a simple GUI (in French and English)
to open PDF files with zathura.
___________________________________
I made a simple GUI (in French and English)
to open PDF files with zathura.
___________________________________
Hi Seaside
Have produced a new script file using copy and paste as described before but got the same outcome when I ran it. Compared both files with Xfdiff and they were identical so if I am doing something wrong then at least I am doing it consistently. I have done this before with other scripts and it has worked.
Hi Don570
Have just tried your gui pet for zathura and it worked. I like the " key shortcuts". I though it was a good idea to bring them up then minimise them so as if I forgot one I could bring them up again. However, if I minimise the short cuts the rest of the gui becomes unresponsive. Should I be able to minimise the shortcuts in this way? I also like your "right-click" pet. Its very useful.
Could I ask if it would be possible to convert the " simplePDFreader script submitted by L18L into a pet? I have no idea how to do this myself and do not know how mush work this involves and so I hope I am not asking to much.
Regards,
Ken.
Have produced a new script file using copy and paste as described before but got the same outcome when I ran it. Compared both files with Xfdiff and they were identical so if I am doing something wrong then at least I am doing it consistently. I have done this before with other scripts and it has worked.
Hi Don570
Have just tried your gui pet for zathura and it worked. I like the " key shortcuts". I though it was a good idea to bring them up then minimise them so as if I forgot one I could bring them up again. However, if I minimise the short cuts the rest of the gui becomes unresponsive. Should I be able to minimise the shortcuts in this way? I also like your "right-click" pet. Its very useful.
Could I ask if it would be possible to convert the " simplePDFreader script submitted by L18L into a pet? I have no idea how to do this myself and do not know how mush work this involves and so I hope I am not asking to much.
Regards,
Ken.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Zathura PDF viewer
keniv,
I have tested in lupu525 and cannot reproduce your result.
A test in drake01 has brought up a missing dependency in drake01, so your comment was useful, thanks again.
Wait a moment... or 2?
I have tested in lupu525 and cannot reproduce your result.
A test in drake01 has brought up a missing dependency in drake01, so your comment was useful, thanks again.
Yes, it is possible...you wrote:Could I ask if it would be possible to convert the " simplePDFreader script submitted by L18L into a pet? I have no idea how to do this myself and do not know how mush work this involves and so I hope I am not asking to much.
Wait a moment... or 2?
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Zathura PDF viewer
keniv (and all )
your wish has been a command
Here it is, my 1st pet this year (2nd in total).
Hope it helps
Feedback appreciated
Edit
bugfixed version uploaded, 0.1 deleted
your wish has been a command
Here it is, my 1st pet this year (2nd in total).
Hope it helps
Feedback appreciated
Edit
bugfixed version uploaded, 0.1 deleted
- Attachments
-
- zathura-gui-0.2.pet
- bugfix
- (1.83 KiB) Downloaded 626 times
Last edited by L18L on Tue 19 Jul 2011, 16:21, edited 1 time in total.