Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Is there a way to display PDF file on firefox without the file getting downloaded?

  • 4 个回答
  • 3 人有此问题
  • 1 次查看
  • 最后回复者为 Supriya_YD

more options

Hi,

I am using an iframe to render a PDF file on firefox. The file gets downloaded in C:\Users\xxx\AppData\Local\Temp folder and the downloaded file is opened by the PDF reader and is not visible inside the browser window.

Is there any way to restrict the file from being opened by PDF reader and to show it in the browser window itself (the way its is displayed on chrome browser) ?

I am using below code to render in browser: <iframe style="margin-top:10px;" src="' + ArtifactfilePath + '#toolbar=0" width="100%" height="100%" id="iFramePdf" #zoom="200" frameborder="1"></iframe>

ArtifactfilePath is the filepath.

Hi, I am using an iframe to render a PDF file on firefox. The file gets downloaded in C:\Users\xxx\AppData\Local\Temp folder and the downloaded file is opened by the PDF reader and is not visible inside the browser window. Is there any way to restrict the file from being opened by PDF reader and to show it in the browser window itself (the way its is displayed on chrome browser) ? I am using below code to render in browser: <iframe style="margin-top:10px;" src="' + ArtifactfilePath + '#toolbar=0" width="100%" height="100%" id="iFramePdf" #zoom="200" frameborder="1"></iframe> ArtifactfilePath is the filepath.

被采纳的解决方案

That is not possible, only when the builtin Firefox PDF Viewer is used then the file won't be downloaded to the temp folder (but will still be downloaded and stored in the cache). Files that are passed to an external application are always saved to the temp folder.

定位到答案原位置 👍 2

所有回复 (4)

more options

Firefox opens a PDF file in a tab only if the server sends this file as application/pdf. Any other type or a generic type will Firefox show the download (open with) dialog.


more options

Hello,

Thanks for your reply.

My doubt is not yet resolved :(

How can we block the PDF from being downloaded in tmp file?

more options

选择的解决方案

That is not possible, only when the builtin Firefox PDF Viewer is used then the file won't be downloaded to the temp folder (but will still be downloaded and stored in the cache). Files that are passed to an external application are always saved to the temp folder.

more options

Thank you! My query is resolved.