Page 1 of 1

gpdf 0.6 - gtkdialog pdf viewer

Posted: Wed Oct 26, 2022 11:31 pm
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 39 times

Re: gpdf 0.1 - gtkdialog pdf viewer

Posted: Wed Oct 26, 2022 11:48 pm
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).


Re: gpdf 0.1 - gtkdialog pdf viewer

Posted: Thu Oct 27, 2022 12:09 am
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:


Re: gpdf 0.1 - gtkdialog pdf viewer

Posted: Thu Oct 27, 2022 1:40 am
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.


Re: gpdf 0.2 - gtkdialog pdf viewer

Posted: Thu Oct 27, 2022 2:17 am
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.


Re: gpdf 0.2 - gtkdialog pdf viewer

Posted: Sat Oct 29, 2022 4:47 am
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.


Re: gpdf 0.3 - gtkdialog pdf viewer

Posted: Tue Nov 01, 2022 12:10 am
by plinej

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

Posted: Wed Nov 02, 2022 4:31 pm
by plinej

0.4 is up, just a minor fix


pinstall.sh script

Posted: Thu Nov 03, 2022 10:24 pm
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 76 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
_________________________________________________________


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Thu Nov 03, 2022 11:40 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Wed Nov 09, 2022 9:15 pm
by don570

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


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Fri Feb 10, 2023 1:17 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Fri Feb 10, 2023 2:31 pm
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:


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Fri Feb 10, 2023 6:02 pm
by Sofiya

Great program, it works.
tested on KLA-OT2


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Fri Feb 10, 2023 7:43 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Sat Feb 11, 2023 2:57 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Mon Feb 13, 2023 11:29 am
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Mon Feb 13, 2023 10:28 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Tue Feb 14, 2023 4:13 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Tue Feb 14, 2023 7:49 pm
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 2182 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:


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Wed Feb 15, 2023 6:49 am
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Wed Feb 15, 2023 3:41 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Wed Feb 15, 2023 10:29 pm
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?


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Wed Feb 15, 2023 10:49 pm
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


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Thu Feb 16, 2023 12:45 am
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).


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Thu Feb 16, 2023 7:04 pm
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.


Re: gpdf 0.5 - gtkdialog pdf viewer -Bookworm64

Posted: Thu Feb 29, 2024 9:34 pm
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:


Re: gpdf 0.5 - gtkdialog pdf viewer

Posted: Fri Mar 01, 2024 3:18 am
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.


Re: gpdf 0.6 - gtkdialog pdf viewer

Posted: Sun Mar 03, 2024 1:59 pm
by plinej

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