Here's a little pdf viewer I made using gtkdialog. You need to have pdftoppm installed from the poppler-utils package for this to work. If you have ffmpeg installed you will be able to rotate the images.
gpdf 0.6 - gtkdialog pdf viewer
Moderator: Forum moderators
gpdf 0.6 - gtkdialog pdf viewer
-
- Posts: 1546
- Joined: Sun Jul 12, 2020 2:38 am
- Location: S.E. Australia
- Has thanked: 240 times
- Been thanked: 684 times
Re: gpdf 0.1 - gtkdialog pdf viewer
Very Good! Works OK with my old gtk1 emelfm1 filemanager - some newer pdf types wouldn't open within emelfm1, but this opens your file browser, from which a couple of clicks later, those pdfs open! Old ones just open. Rotate works fine (I do have ffmpeg).
- mikewalsh
- Moderator
- Posts: 6134
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 783 times
- Been thanked: 1966 times
Re: gpdf 0.1 - gtkdialog pdf viewer
@plinej :-
Oh, yes. I like this....
Nice work, mate. Especially the rotation/flipping stuff... Excellent!
No doubt we'll be getting some re-writes in the near future....
Mike.
Re: gpdf 0.1 - gtkdialog pdf viewer
I did find a bug when rotating images of any pages after page 1 that I've fixed and added a new option that will be in 0.2. I'll probably upload tomorrow in case I think of anything else to add in the mean time.
Re: gpdf 0.2 - gtkdialog pdf viewer
Updated to 0.2, fixed a couple of bugs and added an option to revert back to original file under the rotation options. If anyone wants options added let me know.
-
- Posts: 1546
- Joined: Sun Jul 12, 2020 2:38 am
- Location: S.E. Australia
- Has thanked: 240 times
- Been thanked: 684 times
Re: gpdf 0.2 - gtkdialog pdf viewer
Interesting - I thought evince etc would not open some pdf via emelfm1 because they were too new - turns out a $ sign in the title stops it.
gpdf, in that case, opens a file browser & after a few clicks opens the pdf.
Re: gpdf 0.3 - gtkdialog pdf viewer
updated to 0.3. Bug fix and new option to save page as a resized jpg if ffmpeg installed.
Re: gpdf 0.4 - gtkdialog pdf viewer
0.4 is up, just a minor fix
pinstall.sh script
I put a pinstall.sh script inside your package to make a right click menu item.
Also I made the pet package in Puppy Precise so that older Puppy distros
can install the package.
I checked it in the recent Easy OS distro and it worked as root user.
It doesn't work with larger pdf files, such as
https://magpi.raspberrypi.com/issues/122/pdf/download
_________________________________________________________
Re: gpdf 0.5 - gtkdialog pdf viewer
@don570 Updated to 0.5 with your pinstall.sh script and fixed the code to open larger pdf files like the one you linked.
-
- Posts: 132
- Joined: Thu Jun 03, 2021 2:25 pm
- Has thanked: 51 times
- Been thanked: 29 times
Re: gpdf 0.5 - gtkdialog pdf viewer
Hi @plinej ,
I saw your gpdf and I download it and tried it immediatly.
It runs very well on Toutou Linux Slaxen 6.0 and Triton 8.0. There are 2 frenchies distro Puppy linux based.
It's great, lightweight, parametrable, smart.
Many thanks to you.
Friendly.
- rockedge
- Site Admin
- Posts: 6518
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2725 times
- Been thanked: 2611 times
- Contact:
Re: gpdf 0.5 - gtkdialog pdf viewer
I saw your gpdf and I download it and tried it immediately.
I did as well finally!! works well in F96-CE
Excellent work! Nice and compact....going to check this out in KLV, KLA and KLU and see how it flies on those systems.....
- Sofiya
- Posts: 2257
- Joined: Tue Dec 07, 2021 9:49 pm
- Has thanked: 1468 times
- Been thanked: 1504 times
Re: gpdf 0.5 - gtkdialog pdf viewer
Great program, it works.
tested on KLA-OT2
- Attachments
-
- Снимок экрана от 2023-02-10 20-59-59.png (296.89 KiB) Viewed 3475 times
KL
PUPPY LINUX Simple fast free
-
- Posts: 653
- Joined: Mon Jul 13, 2020 2:18 pm
- Location: Scotland
- Has thanked: 106 times
- Been thanked: 67 times
Re: gpdf 0.5 - gtkdialog pdf viewer
@plinej
I've just installed v 0.5 in F96-CE and it works very well in "right click" mode. I tried opening a service manual for a radio. It was 7.7MB and opened very quickly however I don't seem to be able to "Adjust image size by percentage" unless I'm misunderstanding what this is supposed to do. I am trying to adjust the size of the part of the page rendered so as I can see a full page in the display. I am doing this in full screen. Also it looks as if the percentage size should be show in the box beside "Adjust image size by percentage" but on mine it is not. Is this supposed to happen?
Regards,
Ken.
Re: gpdf 0.5 - gtkdialog pdf viewer
Yes @keniv, the combobox should have various percentage numbers when you click it. Does it not work with any pdf or just a specific pdf? If it's just 1 file that doesn't work message me a link so I can test it. Also, the combobox displays nothing until you click it and select your desired percentage.
-
- Posts: 653
- Joined: Mon Jul 13, 2020 2:18 pm
- Location: Scotland
- Has thanked: 106 times
- Been thanked: 67 times
Re: gpdf 0.5 - gtkdialog pdf viewer
plinej wrote: ↑Sat Feb 11, 2023 2:57 pmYes @keniv, the combobox should have various percentage numbers when you click it. Does it not work with any pdf or just a specific pdf? If it's just 1 file that doesn't work message me a link so I can test it. Also, the combobox displays nothing until you click it and select your desired percentage.
@plinej
Thanks for your reply. I think I now understand what's supposed to happen and I now think it's working as it should with both large and small pdfs. However, I've found that when I right click on a pdf two instances of gpdf seem to appear on the list. Both have the same icon but on is called "gpdf" and the other is called "Open PDF". both seem to do the same thing. On right clicking a pdf then clicking Custom Menu>OK I get the attached window which only contains Open PDF. Can you tell me if this is what I should expect and if there is any difference between gpdf and Open PDF.
Regards,
Ken.
- Attachments
-
- Screenshot.png (17.49 KiB) Viewed 3384 times
Re: gpdf 0.5 - gtkdialog pdf viewer
@keniv, I really don't use Rox file manager that often. When I run rox on a directory with pdf files it shows gpdf as an option and it seems to load up fine.
-
- Posts: 653
- Joined: Mon Jul 13, 2020 2:18 pm
- Location: Scotland
- Has thanked: 106 times
- Been thanked: 67 times
Re: gpdf 0.5 - gtkdialog pdf viewer
When I run rox on a directory with pdf files it shows gpdf as an option and it seems to load up fine.
When I try this I get two choices one of which is Open PDF. I cannot find a way to get rid of the Open PDF option. I would be interested to know if anyone else sees the Open PDF option.
Regards,
Ken.
-
- Posts: 356
- Joined: Mon Jul 13, 2020 6:14 pm
- Location: Germany, NRW
- Has thanked: 18 times
- Been thanked: 125 times
Re: gpdf 0.5 - gtkdialog pdf viewer
@keniv
I'll have to try to explain - i'm non native english speaking
I can confirm there are two entries in ROX right click menu:
The file /root/.config/rox.sourceforge.net/OpenWith/.application_pdf/Open PDF shows up in ROX right click menu, because it is associated with the mime type identified by ROX Filer. It is a symbolic link to /usr/share/applications/gpdf.desktop
The second entry for gpdf results from ROX Filer capability of adding menu entries from mime types declared in /usr/share/applications/gpdf.desktop
You can safely delete /root/.config/rox.sourceforge.net/OpenWith/.application_pdf/Open PDF - the gpdf entry will not be removed in this case.
I hope this is not confusing, i don't know how to explain any better
Re: gpdf 0.5 - gtkdialog pdf viewer
qpdf-0.5 has a script built in which creates the link /root/.config/rox.sourceforge.neton/OpenWith/.application_pdf/Open PDF.
A script named pinstall.sh is run after installing a .pet file.
In this case, it only includes this link. Removing pinstall.sh should only result in a single entry.
1 unextract qpdf-0.5
2 delete pinstall.sh
3 create a new pet package and install
should do the job.
-
- Posts: 653
- Joined: Mon Jul 13, 2020 2:18 pm
- Location: Scotland
- Has thanked: 106 times
- Been thanked: 67 times
Re: gpdf 0.5 - gtkdialog pdf viewer
@HerrBert
Thanks for your reply and the information and explanation therein. I deleted /root/.config/rox.sourceforge.net/OpenWith/.application_pdf/Open PDF
as you suggested and this has solved the problem.
I'll have to try to explain - i'm non native english speaking
I am certain your English is a lot better than my German. I did do a technical German course when doing a Chemistry degree, however, I think this was in 1968. I only had to be able to read German and I've now forgotten most of it.
@fr-ke
Thanks for your reply.
A script named pinstall.sh is run after installing a .pet file.
In this case, it only includes this link. Removing pinstall.sh should only result in a single entry.
1 unextract qpdf-0.5
2 delete pinstall.sh
3 create a new pet package and install
As you can see from above I removed the Open PDF link which solved the problem but I think that I will try what you have suggested above and make a "new" .pet as I've never done it before.
Thanks again to you both,
Ken.
- wiak
- Posts: 4074
- Joined: Tue Dec 03, 2019 6:10 am
- Location: Packing - big job
- Has thanked: 65 times
- Been thanked: 1204 times
- Contact:
Re: gpdf 0.5 - gtkdialog pdf viewer
I was excited about this, but it seems that Arch Linux at least has qt5/6-base as a dependency of their poppler package, which makes it too big.
EDIT: No. I seem to be wrong. Maybe just needs poppler-glib, so this is very useful package indeed!! EDIT2: I'm still not sure; no poppler-utils package from Arch I think, so maybe need also their 'poppler' package? @Sofiya obviously tried it and can let me know...
However, I don't notice same dependency of Debian/Ubuntu packaging. Is there a minimum dependency set that could be used (even extracted from official upstream deps) to make this gpdf package (very) usefully very small?
https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;
- Sofiya
- Posts: 2257
- Joined: Tue Dec 07, 2021 9:49 pm
- Has thanked: 1468 times
- Been thanked: 1504 times
Re: gpdf 0.5 - gtkdialog pdf viewer
wiak wrote: ↑Wed Feb 15, 2023 10:29 pmI was excited about this, but it seems that Arch Linux at least has qt5/6-base as a dependency of their poppler package, which makes it too big.
EDIT: No. I seem to be wrong. Maybe just needs poppler-glib, so this is very useful package indeed!! EDIT2: I'm still not sure; no poppler-utils package from Arch I think, so maybe need also their 'poppler' package? @Sofiya obviously tried it and can let me know...
However, I don't notice same dependency of Debian/Ubuntu packaging. Is there a minimum dependency set that could be used (even extracted from official upstream deps) to make this gpdf package (very) usefully very small?
I do not install anything, just the files are arranged in folders and that's it. and everything works.
In KLA-OT2, all dependencies for this are already installed.
and you can even rotate the image
- Attachments
-
- Снимок экрана от 2023-02-16 01-57-18.png (34.74 KiB) Viewed 3367 times
-
- Снимок экрана от 2023-02-16 02-10-03.jpg (110.74 KiB) Viewed 3367 times
KL
PUPPY LINUX Simple fast free
- wiak
- Posts: 4074
- Joined: Tue Dec 03, 2019 6:10 am
- Location: Packing - big job
- Has thanked: 65 times
- Been thanked: 1204 times
- Contact:
Re: gpdf 0.5 - gtkdialog pdf viewer
Ah, that's good to hear; I'll add this to next release.
EDIT: It's superb. A game changer for small pdf viewer (and more than that).
https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;
- bigpup
- Moderator
- Posts: 6962
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 897 times
- Been thanked: 1517 times
Re: gpdf 0.5 - gtkdialog pdf viewer
The pet is small enough that you can just attach it to the first post as a download.
This forum allows attachments of pet packages as long as they are no bigger than 512KiB.
Note:
I am using it, running in Raspup, booting a Raspberry Pi 400 computer.
So, this seems to be a program, that should work in about all the different Puppy versions.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
- mikeslr
- Posts: 2947
- Joined: Mon Jul 13, 2020 11:08 pm
- Has thanked: 178 times
- Been thanked: 907 times
Re: gpdf 0.5 - gtkdialog pdf viewer -Bookworm64
Thanks, plinej. Nice to have something uncomplicated. Bookworm64 has qpdf built-in. But I've installed something with a different version of QT5 that rendered it in operative. gpdf worked OOTB.
- MochiMoppel
- Posts: 1229
- Joined: Mon Jun 15, 2020 6:25 am
- Location: Japan
- Has thanked: 21 times
- Been thanked: 436 times
Re: gpdf 0.5 - gtkdialog pdf viewer
@plinej Your calculation of the screen dimension is wrong.
My screen has a width of 1200 and height of 1600, however the gpdf window is 1400px wide (calculated as 1600-200), sending the right buttons off screen.
When using xrandr for your calculation you should use the actual screen dimension listed in the upper part of the output, not the one from the list of supported dimensions. IMHO using xwininfo would be easier and less error prone.
Regarding the calculation I had once posted 37 different ways to do it. As you can see using xrandr ranked at the bottom when it comes to efficiency.
Re: gpdf 0.6 - gtkdialog pdf viewer
Updated to 0.6, bugfix using xwininfo instead of xrandr per @MochiMoppel's suggestion.