gpdf 0.6 - gtkdialog pdf viewer

Moderator: Forum moderators

Post Reply
plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

gpdf 0.6 - gtkdialog pdf viewer

Post by plinej »

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.pet
(9.27 KiB) Downloaded 20 times
Last edited by plinej on Sun Mar 03, 2024 1:58 pm, edited 7 times in total.
You can download my packages at https://archive.org/download/plinej-packages
ozsouth
Posts: 1366
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 210 times
Been thanked: 605 times

Re: gpdf 0.1 - gtkdialog pdf viewer

Post by ozsouth »

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).

User avatar
mikewalsh
Moderator
Posts: 5578
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1684 times

Re: gpdf 0.1 - gtkdialog pdf viewer

Post by mikewalsh »

@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.... :D

Mike. :thumbup:

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.1 - gtkdialog pdf viewer

Post by plinej »

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.

You can download my packages at https://archive.org/download/plinej-packages
plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.2 - gtkdialog pdf viewer

Post by plinej »

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.

You can download my packages at https://archive.org/download/plinej-packages
ozsouth
Posts: 1366
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 210 times
Been thanked: 605 times

Re: gpdf 0.2 - gtkdialog pdf viewer

Post by ozsouth »

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.

plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.3 - gtkdialog pdf viewer

Post by plinej »

updated to 0.3. Bug fix and new option to save page as a resized jpg if ffmpeg installed.

You can download my packages at https://archive.org/download/plinej-packages
plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.4 - gtkdialog pdf viewer

Post by plinej »

0.4 is up, just a minor fix

You can download my packages at https://archive.org/download/plinej-packages
don570
Posts: 624
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 98 times

pinstall.sh script

Post by don570 »

I put a pinstall.sh script inside your package to make a right click menu item.

gpdf-0.4a.pet
(9.96 KiB) Downloaded 48 times

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
_________________________________________________________

plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by plinej »

@don570 Updated to 0.5 with your pinstall.sh script and fixed the code to open larger pdf files like the one you linked.

You can download my packages at https://archive.org/download/plinej-packages
don570
Posts: 624
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 98 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by don570 »

Yes. It opens large pdf files.
I installed it in fatdog64 as well
_____________________________

Rantanplan
Posts: 106
Joined: Thu Jun 03, 2021 2:25 pm
Has thanked: 35 times
Been thanked: 23 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by Rantanplan »

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.

:thumbup2: :thumbup:

Friendly.

User avatar
rockedge
Site Admin
Posts: 5727
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1998 times
Been thanked: 2101 times
Contact:

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by rockedge »

I saw your gpdf and I download it and tried it immediately.

I did as well finally!! works well in F96-CE :thumbup:

Excellent work! Nice and compact....going to check this out in KLV, KLA and KLU and see how it flies on those systems..... :geek:

User avatar
Sofiya
Posts: 1812
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1203 times
Been thanked: 1080 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by Sofiya »

Great program, it works.
tested on KLA-OT2

Attachments
Снимок экрана от 2023-02-10 20-59-59.png
Снимок экрана от 2023-02-10 20-59-59.png (296.89 KiB) Viewed 1861 times

Vanilla Dpup 9.2.X - KLV-Airedale - KLA-OT2
PUPPY LINUX Simple fast free

keniv
Posts: 627
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 99 times
Been thanked: 65 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by keniv »

@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.

plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by plinej »

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.

You can download my packages at https://archive.org/download/plinej-packages
keniv
Posts: 627
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 99 times
Been thanked: 65 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by keniv »

plinej wrote: Sat Feb 11, 2023 2:57 pm

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.

@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
Screenshot.png (17.49 KiB) Viewed 1770 times
plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by plinej »

@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.

You can download my packages at https://archive.org/download/plinej-packages
keniv
Posts: 627
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 99 times
Been thanked: 65 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by keniv »

plinej wrote: Mon Feb 13, 2023 10:28 pm

@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.

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.

HerrBert
Posts: 330
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 110 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by HerrBert »

@keniv
I'll have to try to explain - i'm non native english speaking :oops:
I can confirm there are two entries in ROX right click menu:

gpdf-rox-menu.jpg
gpdf-rox-menu.jpg (31.91 KiB) Viewed 1669 times

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 :oops:

fr-ke
Posts: 105
Joined: Mon Nov 07, 2022 3:18 pm
Has thanked: 4 times
Been thanked: 35 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by fr-ke »

@keniv

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.

keniv
Posts: 627
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 99 times
Been thanked: 65 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by keniv »

@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.

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by wiak »

plinej wrote: Wed Oct 26, 2022 11:31 pm

Here's a little pdf viewer I made using gtkdialog.

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
Αξίζει να μεταφραστεί;

User avatar
Sofiya
Posts: 1812
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1203 times
Been thanked: 1080 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by Sofiya »

wiak wrote: Wed Feb 15, 2023 10:29 pm
plinej wrote: Wed Oct 26, 2022 11:31 pm

Here's a little pdf viewer I made using gtkdialog.

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?

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
Снимок экрана от 2023-02-16 01-57-18.png (34.74 KiB) Viewed 1730 times
Снимок экрана от 2023-02-16 02-10-03.jpg
Снимок экрана от 2023-02-16 02-10-03.jpg (110.74 KiB) Viewed 1730 times

Vanilla Dpup 9.2.X - KLV-Airedale - KLA-OT2
PUPPY LINUX Simple fast free

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by wiak »

Sofiya wrote: Wed Feb 15, 2023 10:49 pm

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.

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
Αξίζει να μεταφραστεί;

User avatar
bigpup
Moderator
Posts: 6273
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 734 times
Been thanked: 1294 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by bigpup »

@plinej

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.

Forum Global Moderator
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 :o

User avatar
mikeslr
Posts: 2793
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 173 times
Been thanked: 837 times

Re: gpdf 0.5 - gtkdialog pdf viewer -Bookworm64

Post by mikeslr »

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. :thumbup:

User avatar
MochiMoppel
Posts: 1118
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 17 times
Been thanked: 359 times

Re: gpdf 0.5 - gtkdialog pdf viewer

Post by MochiMoppel »

@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.

plinej
Posts: 236
Joined: Thu Jul 16, 2020 1:39 am
Has thanked: 6 times
Been thanked: 98 times

Re: gpdf 0.6 - gtkdialog pdf viewer

Post by plinej »

Updated to 0.6, bugfix using xwininfo instead of xrandr per @MochiMoppel's suggestion.

You can download my packages at https://archive.org/download/plinej-packages
Post Reply

Return to “Documents”