PDF Handling

User Help for Mozilla Firefox
Post Reply
albarellij
Posts: 3
Joined: August 8th, 2018, 9:07 am

PDF Handling

Post by albarellij »

I asked a similar question before, my org. has changed its mind, so here's what I'm doing:

Deploying Firefox ESR 60 (latest, 60.2 or whatever) with an autoconfig file to our user base...

I have the internal PDF viewer enabled, so pdfs should open/preview there by default. This is necessary because some of our custom pages have pdfs embedded in frames, and without this enabled, they won't display.

So that works fine...but we also have some fillable forms on our site, which don't work properly in FF PDFJS...and we have some scripts that generate reports in pdf format, some are landscape and some are portrait and PDFJS doesn't know how to print them automatically in the right orientation...

So we changed our website html to FORCE those fillable PDFs or reports to download...fine.

Now, when we click on those fillable PDFs, a box pops up asking whether to open in Adobe or save the file, with a checkbox to remember that setting...

If the user selects "Save", and checks the box, it saves every time, like clockwork. But if a user selects Open in Adobe and checks the box, it asks EVERY time...how can I get it to actually remember in this case? I've tried playing with the pdfjs settings i about:config, but haven;t found the right combination, if this is possible. Any ideas? Thanks.
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: PDF Handling

Post by jscher2000 »

What is the content-type header sent with the download? If it's not application/pdf, but instead some generic type (like application/octet-stream) then opening every time may not work.

Unless something has changed, I think the best approach is to send content-type: application/pdf and content-disposition: attachment.
Post Reply