PDF viewing support is not trivial

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
MoonWalker
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2020-10-13, 15:38

PDF viewing support is not trivial

Unread post by MoonWalker » 2021-04-05, 12:36

After notice that in some discussions here the given response about maintain pdf reading capabilities was "Get a proper PDF reader/editor" let me warn you that PDF viewer is an essential component for a modern web browser.

No, is not about use the web browser instead the proper app, is about browsing experience. For many kinds of users when they search something on internet many results are not html pages but pdfs. If you are looking for some specific information you need to review many pdfs until you find what you need. Try to do that downloading each pdf and then open it in the desktop pdf application. It's a mess.

Pdf viewer capability gives you the possibility to take a look at the pdf and decide if you keep or discard the document. However, that the web browser was a viewer for embedded pdfs is a logical characteristic as the web browser is a video/audio player or image viewer. You do not download videos and mp3 and play later in the media player or download jpg o png files and open later in the desktop image viewer app. You are able to do that by the web browser.

I guess there are many technical issues about that, and for now the Isaac Schemm's plug-in works fine. But the point is that no because you do not use that characteristic it means that it is not important.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: PDF viewing support is not trivial

Unread post by Moonchild » 2021-04-05, 13:30

Another self-proclaimed expert?

Either way, clicking a PDF in Pale Moon when you have a PDF reader installed on your system is as seamless as viewing it in the browser. The only difference is that it will open in its own application. it's either 1 click (if you tell it to ask) or 0 clicks (if you tell it to always open in the reader) away. You don't need a PDF plugin (and I advise against them because of the inherent security implications of loading foreign documents inside the browser).

PDF is not a native format for a web browser. It never has been. Images are, and since the advent of the <video> element, so are videos. There is no <pdf> html element that describes PDFs. They are a foreign document format and treated as such.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
MoonWalker
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2020-10-13, 15:38

Re: PDF viewing support is not trivial

Unread post by MoonWalker » 2021-04-05, 18:20

Another self-proclaimed expert?
Yeah, I have more than 20 years of experience as web browser user. Should I have a specific background to post here?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: PDF viewing support is not trivial

Unread post by Moonchild » 2021-04-05, 18:39

MoonWalker wrote:
2021-04-05, 18:20
Yeah, I have more than 20 years of experience as web browser user.
I think everyone over the age of 30 does, to be fair.
MoonWalker wrote:
2021-04-05, 18:20
Should I have a specific background to post here?
No, it was just a remark about your tone of posting as a new user. I'm asking you to remain open to other opinions and facts as they present themselves.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: PDF viewing support is not trivial

Unread post by New Tobin Paradigm » 2021-04-05, 22:24

Here are some facts: Non-plugin pdf viewing in Firefox was always pretty shit up till a few years ago. Our version, when we had it was just that and indeed was a security nightmare (which it still is in Firefox). We dropped it long before it became fairly ok to use because of the maintenance burdon (of trying it make it less shit) it placed on us and for those security reasons.

This built-in pdf thing started as part of the agenda to kill plugins and even on that front we couldn't in good faith perpetuate that agenda. Likewise everywhere that is Chrome that has this functionality has it because Chrome has it and it was Google's agenda from the start.

All that plus, as Moonchild stated, PDF is and never WAS a native web format. It is NO DIFFERENT than any other proprietary desktop format such as a Word Document or Excel Spreadsheet. Sure there are big ol readers and editors provided as a service that can run on the web with megs and megs of client side js and server backend code but even as good as say Google's offering in their own browser is.. Still seems inferior to Office 2003. Likewise even in Chrome browsers reading PDFs seems inferior to Acrobat from the same era.

So put that in your 20 years of pipe experience and smoke it.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: PDF viewing support is not trivial

Unread post by moonbat » 2021-04-06, 00:05

MoonWalker wrote:
2021-04-05, 12:36
No, is not about use the web browser instead the proper app, is about browsing experience

It is exactly about that.
A web browser is a document viewer for HTML pages, regardless of the Frankenstein's monster that the modern web browser Chrome has become by throwing support for everything and the kitchen sink into it. Different applications serve different purposes and mashing them together only results in bloat, complexity and a humongous attack surface for security exploits. Entire classes of Firefox PDF viewer exploits are simply non applicable to Pale Moon because of firmly not including that feature here. So yes, a browsing experience is about viewing webpages not a mish mash of incompatible binary formats.

Use dedicated applications for email, media consumption and instant messaging and you don't have to worry about browser memory leaks due to running tons of poorly coded Javascript and various exploits targeting these non web formats.

And finally, the beauty of a powerful extension system is that if you still want to view PDF in the browser there's an extension for that that targets Pale Moon. Those that want can use it instead of it bloating the browser core.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
MoonWalker
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2020-10-13, 15:38

Re: PDF viewing support is not trivial

Unread post by MoonWalker » 2021-04-06, 05:16

Here are some facts: Non-plugin pdf viewing in Firefox was always pretty shit up till a few years ago. Our version, when we had it was just that and indeed was a security nightmare (which it still is in Firefox). We dropped it long before it became fairly ok to use because of the maintenance burdon (of trying it make it less shit) it placed on us and for those security reasons.
Your game your rules. You (developers) are who promote an alternative path to use the internet, you should care about end user experience.
This built-in pdf thing started as part of the agenda to kill plugins and even on that front we couldn't in good faith perpetuate that agenda. Likewise everywhere that is Chrome that has this functionality has it because Chrome has it and it was Google's agenda from the start.

All that plus, as Moonchild stated, PDF is and never WAS a native web format.
I do not know what are you talking about. Pdf reader capabilities within web browser can be traced back at least to 1997, when Adobe Acrobat was an add-on for IE and Netscape, before Google Inc. had born and even a decade before Chrome existed.

Think about that, someone considered that to be able to view pdf within the web browser was a desirable feature. It is not a crazy concept. It is right that pdf won't be a web format but is true that web browsers have been implementing pdf reading for two decades. Probably due I wrote "essential component" it was interpreted as built-in request. But I do not care if it is a buil-in, extension, add-on, plug-in or whatever you want to call it, I think is desirable the feature to be able to view pdf withing the web browser.

I stated that I currently use the extension mentioned by Moonbat. My post was about that PM should not abandon that capability, do not consider it "trivial".
It is NO DIFFERENT than any other proprietary desktop format such as a Word Document or Excel Spreadsheet.
First, both PDF and OOXML are open specifications, so again I do not know what are you talking about.
Second, pdf is a very different format due to its "portability". Since regardless of device where it is displayed pdf is able to mantain the document desing it's a file format widely used on the web to show documents instead of editable formats like word. That is the reason because pdf view feature is more pertinet than other kind of document view capability in the web browser.
So put that in your 20 years of pipe experience and smoke it.
Thank you for the warm welcome.

New Tobin Paradigm

Re: PDF viewing support is not trivial

Unread post by New Tobin Paradigm » 2021-04-06, 06:51

Yes via a plugin it was viewable in the browser. Also, because of our exceptional extensibility you can STILL do it with an Extension. What we are NOT doing is providing it in the browser core for the reasons stated. But plugins weren't bundled (except java in Netscape) with the browser. You had to deal with them separately so instead of out of the box emulating something poorly we leave it to any remaining npapi plugins or extensions created for the purpose. There are ALSO THOSE who DO NOT LIKE viewing non-web content like that in the browser and prefer to download it/open it in a native application.

So really out of the box, you STILL have to choose a way to deal with PDF files just like you have ALWAYS HAD TO except when browsers like Chrome and later model Firefox started thinking and deciding for you. So really, you have a strange misconception of what actually took place in reality.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: PDF viewing support is not trivial

Unread post by moonbat » 2021-04-06, 07:42

MoonWalker wrote:
2021-04-06, 05:16
Pdf reader capabilities within web browser can be traced back at least to 1997, when Adobe Acrobat was an add-on for IE and Netscape
Yeah, using the Netscape Plugin API that was developed for this exact purpose (and which continues to be supported in Pale Moon) - handing off the job of displaying proprietary/non HTML/DRMed content to the appropriate third party applications so that the browser doesn't have to deal with it. How do you think Flash content used to be rendered in Pale Moon and Firefox, or Java applets used to run, or Silverlight continues to be used by Pale Moon on Windows to watch Netflix - by the browser developers writing the code to parse and display each and every one of these?
In all these cases, it was the third party application (Acrobat Reader, Sun/Oracle Java Runtime, Flash and Silverlight) that did the actual rendering, not Netscape or its descendants. If you didn't have these applications installed, you couldn't view them in the browser.

Imagine going back 24 years and drawing such a spectacularly wrong conclusion. Half baked knowledge is a dangerous thing.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Lucio Chiappetti
Astronaut
Astronaut
Posts: 654
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: PDF viewing support is not trivial

Unread post by Lucio Chiappetti » 2021-04-06, 10:07

Personally I always hated viewing pdf in the browser (I prefer to defer it to an external viewer offering the possibility of saving or viewing), although some sites try to arrange for it partially (my bank, for instance in three or four different ways, sigh! ; or google drive when I'm forced to use it).
What I've always missed instead is the possibility of imbedding PostScript plots in an HTML page (I am very fond of PostScript, also handwritten :D ) ... it is true one can do it with SVG, but PostScript is nicer to work with.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

New Tobin Paradigm

Re: PDF viewing support is not trivial

Unread post by New Tobin Paradigm » 2021-04-06, 10:17

Well with Pale Moon there are options.. save, open with, use an old pdf plugin, or use an extension. It is almost like it is Your Browser, Your way or something.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: PDF viewing support is not trivial

Unread post by Moonchild » 2021-04-06, 14:02

MoonWalker wrote:
2021-04-06, 05:16
You (developers) are who promote an alternative path to use the internet, you should care about end user experience.
To answer this specific point since others haven't: We do care about end user experience, actually more than the alternatives.

By providing a fully customizable and extensible browser core we give the end user complete freedom how they want to handle non-native formats, and when those formats are enabled (in-browser support will usually be always-on, even on websites where you don't want it!). We have our slogan for a reason.
The way of handling PDFs is therefore a choice: install a dedicated reader and have the browser redirect PDF documents to it. OR use an NPAPI plugin to display it in-content with a dedicated binary plugin (which gets the benefit of process separation). OR use an extension to get the js-based in-content experience (with the advantage that this can also be enabled and disabled at will).

How is that not caring about end user experience? I'd say it's more than you'll get anywhere else.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: PDF viewing support is not trivial

Unread post by moonbat » 2021-04-06, 14:24

Off-topic:
Are there any currently available PDF viewers on Linux that also provide an NPAPI plugin?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: PDF viewing support is not trivial

Unread post by Moonchild » 2021-04-06, 15:47

Off-topic:
moonbat wrote:
2021-04-06, 14:24
Are there any currently available PDF viewers on Linux that also provide an NPAPI plugin?
I don't know but is it necessary? Just redirecting to a reader would be better on Linux, I think, anyway, as plugin-handling on Linux isn't as smooth as on Windows.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: PDF viewing support is not trivial

Unread post by moonbat » 2021-04-07, 03:51

I was just curious, given that there have been lots of alternate PDF viewers like SumatraPDF etc on Windows. I'm using the PDF.js extension in conjunction with LinkAlert, so know it's a PDF link beforehand and can decide whether to view it in the browser or download it.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
MoonWalker
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2020-10-13, 15:38

Re: PDF viewing support is not trivial

Unread post by MoonWalker » 2021-04-07, 21:28

I am still wondering why what I said was interpreted like "You must do as Chrome do" when I did not say any similar.

I was always talking about integrated pdf reader, hereafter referred to as InPR.
How is that not caring about end user experience?
Well, specifically for the InPR I find the following:

When someone asked about InPR replies mood was, let's say, not supportive.

Then, since last year PM pdf extension no longer exist. There is no indication in PM add-on page how to get InPR and users are explicity discourage to use InPR, so at first sight looks like PM does not support IPR. Some research is needed to figure out how to enable InPR in PM.

For me, that is in the path to end PM InPR support because it is not considered important. You are pretty free to dislike, avoid, discourage, hate and curse InPR, but many people actually find it functional. As many had found functional since InPR exists from years ago. So the whole point of what I stated was strongly recommended you do not consider InPR a 2nd class feature.

New Tobin Paradigm

Re: PDF viewing support is not trivial

Unread post by New Tobin Paradigm » 2021-04-07, 22:42

The fuck is IPR/InPR?

As for how can it be assumed you are referring to Chrome? You said "Modern Web Browser" and there are only two and a half mainstream browser engines in use today: Blink and Quantum-Gecko (Firefox 57 on). The half is of course WebKit which Blink was based on but no one other than Apple (and maybe KDE) gives a shit about it.

Since Google started this non-sense in their kill-all-plugins agenda and Mozilla merely followed along it isn't a leap to construe your position of it being an essential feature of "Modern Web Browsers" as we should do the same as Chrome. OF COURSE, we ain't gonna do that for the numerous reasons outlined above and in the 2019 thread and likely even more older threads from back when we got rid of it in the first place.

Before you try this point on us.. Again Mozilla merely followed along to do the same as Chrome so can't really use that simply because we are descended from Firefox as a supporting point for your position. As an aside, the ONLY reason PDF.js hasn't been removed from Basilisk is because it is a much more mature version than what was originally in Pale Moon. ATM it has no known-to-us security flaws and if push came to shove it would likely be excised too because it remains a maintenance nightmare if something would have to be done with it. Even in its more mature state it isn't exactly what I would call "Good" more it is merely "There". So cba either way.

In conclusion, your plea that a PDF Reader should restored to the Pale Moon browser core is officially:

RESOLVED WONTFIX

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: PDF viewing support is not trivial

Unread post by moonbat » 2021-04-08, 00:37

New Tobin Paradigm wrote:
2021-04-07, 22:42
The fuck is IPR/InPR?
He means this -
MoonWalker wrote:
2021-04-07, 21:28
I was always talking about integrated pdf reader, hereafter referred to as InPR.
Also, why are you still going on about this when I already linked you to a solution for your requirement?
moonbat wrote:
2021-04-06, 00:05
And finally, the beauty of a powerful extension system is that if you still want to view PDF in the browser there's an extension for that that targets Pale Moon. Those that want can use it instead of it bloating the browser core.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
MoonWalker
Apollo supporter
Apollo supporter
Posts: 31
Joined: 2020-10-13, 15:38

Re: PDF viewing support is not trivial

Unread post by MoonWalker » 2021-04-08, 18:15

What a reading skill. My God!

How did you figure that a thread placed at PLUG-INS section pretended to say something about the browser's core?

And I clearly stated that
for now the Isaac Schemm's plug-in works fine
at the very first thought I wrote. Everything else is my opinion about InPR support in PM.

New Tobin Paradigm

Re: PDF viewing support is not trivial

Unread post by New Tobin Paradigm » 2021-04-08, 20:08

Why don't you spend less time bitching and making up non-existant acronyms and more time doing something contructive like forking an extension or five.

Locked