Live data from Hacker News

Embedded PDF viewer in Firefox 81 supports filling forms

support.mozilla.org

41–50 of 384 posts

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#41
post #29

Earlier quoted context omitted.

There are lots of use cases for PDF where a web page is totally unsuitable.

Yes, maybe generally; but let’s talk about the specific case here — filling of complex PDF forms. When a PDF that has interactive form fields, calculated auto-populated fields, fields that are enabled/disabled according to the inputs of other fields, etc. — the organization that created it (usually government or education) usually does that because they want you to fill it out using a PDF viewer; save it (which will…

The use case you're describing wasn't feasible until about 20 years after PDFs were introduced. Web Storage isn't that old, has only recently become widely deployed, and in a lot of cases is disabled for security concerns.

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#43
post #29

Earlier quoted context omitted.

There are lots of use cases for PDF where a web page is totally unsuitable.

Yes, maybe generally; but let’s talk about the specific case here — filling of complex PDF forms. When a PDF that has interactive form fields, calculated auto-populated fields, fields that are enabled/disabled according to the inputs of other fields, etc. — the organization that created it (usually government or education) usually does that because they want you to fill it out using a PDF viewer; save it (which will…

> In fact, many such “fillable” PDFs start off in a state with many of their form-fields disabled and voided, such that printing them out in that state would result in a form you can’t really write on!

I have never seen this. Do you have an example? Every use if fillable PDFs I have encountered is a use case where submitting a handwritten form is still an option.

> The only benefit a client gets is the ability to edit and save the form offline (but that can be done in a browser, too, with local storage); and furthermore, the ability to treat the resulting filled form as a file, moving it around before you submit it.

I have yet to see a web form that actually saves a readable, properly-formatted, self-contained, easy to access, fully-offline copy.

> But the cases where you need that are very niche, compared to the cases where you can just direct employees to your Intranet portal.

This is not a trivial need; most forms sent as fillable PDFs need to or should be retained for some period after submission. Also, I don't know what "employees" and "Intranet" has to do with anything.

You are also missing the use case where a form legally requires a live signature from one or more parties and need to be printed, even if just to scan and return. I recently had to do this for some insurance paperwork.

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#44
I'm the author of Polar (https://getpolarized.io/) that uses PDF.js as its PDF backend.

This is a somewhat big update for PDF.js which is kind of cool in that they haven't really been updating it as aggressively as they usually do in the last year or so.

It's a bit frustrating to work with though. The entire concept of rendering a PDF via JS is fascinating but actually using the API has been a huge pain for us.

We've had to fork it internally and work on typescript bindings and other features to get it to work.

They seem to have a silly policy of only allow developers to use a subset of the API not the whole API itself so that it doesn't look like PDF.js (which I don't understand).

A lot of the functionality just isn't available otherwise.

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#45
post #15

I looked into coding PDFs once. Then I closed my MacBook (Pro) and went for a long walk into the ocean. I think I almost got to America, but then I turned and swam back again. Turnd out I had just fallen asleep and had a nightmare. I was actually just working with regular text files, and everything was fine.

My favourite PDF fact is that it doesn't have to start at the beginning or end at the end of a file. Any sea of bytes that contains a PDF file is an acceptable PDF file...

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#46
post #33
post #28

“After entering data into these fields you can download the file to have the filled out version saved to your computer.” What’s the use case? Printing out filled-in forms? But otherwise, who would want the PDF in electronic format? It doesn’t seem like a practical way for users to submit data.

Printing is one use case. Also plenty places that want filled out forms uploaded, e-mailed, ... + it allows you to keep a copy with what you entered.

That's my point. Other than printing a nice looking form (which includes faxing), the content of the field data is hard to reuse. Searching PDF content on your own hard drive is problematic.

Are there utilities that extract PDF field data and submit it to a database? I'd be grateful to see examples.

What about field validation? The PDF may have some minor validation, but that's no substitute for the validation done in a DBMS.

If you want users to be able to save a nice looking form, you'd still want the data entered online directly into a DBMS. I'd offer a "download PDF of your input" as an option, for example.

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#47

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?

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.

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#48
post #29

Earlier quoted context omitted.

Yes, maybe generally; but let’s talk about the specific case here — filling of complex PDF forms. When a PDF that has interactive form fields, calculated auto-populated fields, fields that are enabled/disabled according to the inputs of other fields, etc. — the organization that created it (usually government or education) usually does that because they want you to fill it out using a PDF viewer; save it (which will…

> In fact, many such “fillable” PDFs start off in a state with many of their form-fields disabled and voided, such that printing them out in that state would result in a form you can’t really write on! I have never seen this. Do you have an example? Every use if fillable PDFs I have encountered is a use case where submitting a handwritten form is still an option. > The only benefit a client gets is the ability to edi…

> You are also missing the use case where a form legally requires a live signature from one or more parties and need to be printed, even if just to scan and return. I recently had to do this for some insurance paperwork.

My company have to do this for one state government. They required the signature to be written black inked. It is PITA to do since we all have digital signature set up. But nope, this state government required the written signature.

Re: Embedded PDF viewer in Firefox 81 supports filling forms

#49

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?

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 avoi…

> 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

#50
post #9

Truly revolutionary tech

Well, it's a PDF reader that doesn't come with a tracking package, so in a way—yes.

> it's a PDF reader that doesn't come with a tracking package

Uh, what? Firefox supports javascript. PDFs support javascript. Javascript empowers tracking.

Post reply on HN