News for hackers. Stuff that matters.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by PaulHoule on Tuesday September 22, 2020 @10:23AM (#24554653)
I find the built-in PDF reader in Firefox to be bloat. It's OK, it works 95% of the time, but really I want to use a native PDF viewer.

Is there a version of Firefox that removes this bloat?

Given that Mozilla is very resource constrained, why are they working on features that aren't necessary?

Re:Embedded PDF viewer in Firefox 81 supports filling forms by anonymousab on Tuesday September 22, 2020 @10:27AM (#24554721)
And here I found it much less bloated than the other free desktop PDF viewers.

I think Mozilla's line of thought here is that PDF documents are widespread in the web, to the point where they are a de facto web document type. So it makes sense for a web browser to support them rather than calling out to a user's desktop program (though I assume you can configure it to do so instead).

There's probably a bit of "our competitors do it, so we have to too" in there as well.

Re:Embedded PDF viewer in Firefox 81 supports filling forms by derefr on Tuesday September 22, 2020 @10:58AM (#24555191)
I like that single-page PDFs stay in the browser. I don’t want to keep them; I just want to see them. Like any other web-page. I want to be able to hit back, or close the tab, and continue on with my day.

And I also like that I can preview long-form PDFs in the browser, before choosing whether to save them and read them “for real.”

Imagine if every time you opened a direct-linked JPEG image in your browser, it treated it as an attachment, downloading it and opening it in your external image-previewer app, rather than rendering it as a synthesized HTML DOM wrapper around the image. Wouldn’t you be annoyed by how cluttered your Downloads directory would get with random files you never actually wanted to save?

Re:Embedded PDF viewer in Firefox 81 supports filling forms by ocdtrekkie on Tuesday September 22, 2020 @10:29AM (#24554739)
Given that Chrome/Edge also just added the feature, I would point out: All web browsers are using the same library for PDF handling, a feature in pdf.js ends up benefiting a lot of people.

And the reasons for not requiring an outside PDF reader are major: It's yet another likely-to-have-vulnerabilities program people need to install, then update. In most cases, avoiding Adobe programs on your PC is a good way to avoid a lot of vulnerabilities.

Re:Embedded PDF viewer in Firefox 81 supports filling forms by oefrha on Tuesday September 22, 2020 @11:25AM (#24555584)
> All web browsers are using the same library for PDF handling

Chrome/Chromium uses PDFium, not PDF.js, so no. Not sure about Edge.

PDFium has been able to fill out forms for a long time. What’s new for Chrome is the ability to save edited PDF (as fillable).

Re:Embedded PDF viewer in Firefox 81 supports filling forms by ocdtrekkie on Tuesday September 22, 2020 @11:37AM (#24555750)
If Chrome doesn't use pdf.js, then neither would Edge, which is a Chrome fork. My original comment may have been mistaken.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by oefrha on Tuesday September 22, 2020 @12:19PM (#24556358)
A Chromium fork could replace certain components if they so choose. The PDF rendering component would be one of the easier ones to replace.

However, I was able to confirm that Edge uses extension ID mhjfbmdgcfjbbpaeojofohoefgiehjai to render PDF internally[1], same as Chrome, so indeed it's using PDFium.

[1] The rendered PDF element would look like

  <embed id="plugin" type="application/x-google-chrome-pdf" src="..." stream-url="chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/..." headers="..." ...>
And here's the extension's manifest in Chromium source, where you can find the extension ID: https://github.com/chromium/chromium/blob/2baa2b094cdd60e980...
Re:Embedded PDF viewer in Firefox 81 supports filling forms by cptskippy on Tuesday September 22, 2020 @11:04AM (#24555270)
Given the amount of PDF exploits over the years and the habit of browsers to automatically invoke your PDF viewer of choice either as a plug-in or call out, they're an easy target.

Having a sandboxed PDF viewer that works 95% of the time is great. For those 5% circumstances where I am actively trying to view a PDF and it won't work in browser, I'll gladly go through the minimal effort to open it in an external viewer.

Re:Embedded PDF viewer in Firefox 81 supports filling forms by snovv_crash on Tuesday September 22, 2020 @10:26AM (#24554690)
I find it extremely convenient. Also I know a lot of security issues in PDF viewers are effectively solved by running it in the browser's JS sandbox.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by zelly on Saturday September 26, 2020 @10:54PM (#24603846)
Firefox's sandboxing incomplete or nonexistent (e.g. GPU process is not sandboxed on Linux).
Re:Embedded PDF viewer in Firefox 81 supports filling forms by Mediterraneo10 on Tuesday September 22, 2020 @10:34AM (#24554846)
You could also disable Firefox's built-in PDF viewer and instead use an external PDF viewer that doesn't even support Javascript.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by snovv_crash on Tuesday September 22, 2020 @03:51PM (#24559017)
Native PDF clients have had lots of security holes. In this case having the client written in JS means we can repurpose the battle hardened JS sandbox to also contain PDF exploits.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by nitrogen on Tuesday September 22, 2020 @10:46AM (#24555011)
Not all PDF vulnerabilities involve JS though.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by detaro on Tuesday September 22, 2020 @10:46AM (#24555007)
You misunderstand the argument the parent comment makes. It's not about Javscript in PDFs.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by Keycap on Tuesday September 22, 2020 @10:27AM (#24554720)
I hope no one is listing to you.

I don't want to start explaining to my mother, over the phone, how to install and use the pdf viewer anymore :|

Re:Embedded PDF viewer in Firefox 81 supports filling forms by danso on Tuesday September 22, 2020 @10:26AM (#24554686)
A lot of everyday users likely benefit from being able to fill out PDFs in the browser.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by pessimizer on Tuesday September 22, 2020 @11:24AM (#24555562)
It was once an add-on, and it was once disableable. It may still be disableable, but I'm sure there's some strange procedure you have to go through to do it.