Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
K-PDF
Posted by: RJJIII
Date: June 25, 2022 09:25PM

This extension will open PDF documents in the browser. It uses K-Meleon's javascript engine, not NPAPI so you get the security benefit of K-Meleon's javascript engine. JustOff put this together years ago for Pale Moon but it's no longer available from the Pale Moon site or his site. It's open-source software and the icon uses artwork from Lim Chee Aun's Phoenity Aura which is K-Meleon's default. I don't plan any further updates for this but thought I should make it more easily available.

Get K-PDF

I previously would have recommended PDF.js for SeaMonkey but SeaMonkey has now moved onto a post-rewrite Firefox Quantum engine, so it's going to become increasingly incompatible. This includes much code and the localizations from a previous version of PDF.js for Firefox.

I'm just calling it K-PDF. I was concerned that it might be confusing to have an extension doing what plugins used to do. I thought maybe I could do a recursive acronym like how GNU stands for Gnu's Not Unix. But I don't know if anybody would download K-PDF Is Definitely Not A Plugin (KIDNAP).

Oh, and one last note: press ESC to exit fullscreen.

Options: ReplyQuote
Re: K-PDF
Posted by: rodocop
Date: August 08, 2022 02:37PM

First of all, RJJIII,
thank you very much for all your job made for KM. Any new or updated or adopted staff for our browser is invaluable help to keep K-Meleon alive, useful and user friendly.

Never thought that pdf.js can be used inside KM, so really impressed. It just works. Perfect.

Anyway, have made some tests for different ways to read PDFs inside KM.

1) K-PDF
2) SumatraPDF np-plagin
3) Adobe Acrobat 7.0 np-plugim

Test file was googled so one can repeat my test or use his own pdf file.

K-PDF (pdf.js) expectedly is way slower than 3rd parties. Test page opened shows ~550 Mb RAM used by KM and CPU load while scrolling pages is 29-34%. Scroll is relatively slow, page rendering is about 1-2 sec per page (jerki render).
SumatraPDF loads with about 340 Mb of RAM (270 KM + 60-70 Sumatra.exe itself) and CPU load about 15-25%. Render is almost smooth and way faster than with pdf.js
Adobe Acrobat render is almost the same as Sumatra. RAM used is about 380 Mb (270-330 KM + 50-90 Acrobat) and CPU load is about 19-29%.

So we can see that pdf.js isn't very good performer but anyway the existence of inbuilt solution is the great possibility.
And the more important is that it uses less than 2Mb of disk space while Sumatra uses almost 7Mb (still portable and packageable inside KM distrbution) and Acrobat more than 100Mb not portable needing separate installation.

Thank you once again for your efforts!

Options: ReplyQuote
Re: K-PDF
Posted by: RJJIII
Date: August 09, 2022 06:22AM

You're welcome and thanks for the benchmarks! Also, glad to hear to that all 3 solutions worked to some degree.

Options: ReplyQuote
Re: K-PDF
Posted by: WasiFH
Date: February 08, 2023 04:21AM

What about using an online pdf reader engine in a macro? that would be using far less RAM?

Options: ReplyQuote
Re: K-PDF
Posted by: RJJIII
Date: February 08, 2023 04:10PM

I think the RAM usage would be similar to pdf.js because the macro might not use much but the website the macro would pipe the pdf into would have to do something similar to pdf.js. NPAPI let's another application (Adobe or SumatraPDF) display content within K-Meleon which is how they can go so low. Rodocop had likely identified the lightest way to render a pdf in the browser unless there is an even lighter plugin out there

Options: ReplyQuote


K-Meleon forum is powered by Phorum.