在Firefox中使用FireFox中的Preview预览显示PDF [英] display pdf in firefox using built in Preview in FireFox

查看:709
本文介绍了在Firefox中使用FireFox中的Preview预览显示PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从谷歌我发现,如果关于Firefox的内置PDF预览选项的问题有很多。找到的解决方法是基本上禁用PDF查看器并使用另一个。不幸的是,从开发人员的角度来看,这是不可接受的,因为我将无法告诉用户禁用预览器。我在问我的团队是否做错了什么,导致FireFox的预览器窒息?下面是我用来显示PDF的基本几行代码。我是否错过了我的标题?请注意,如果我更改查看器,代码适用于IE和Chrome以及Firefox。

From Google I have found that there are a lot if issues regarding Firefox's built in "Preview option" for PDF's. Workarounds found is to basically disable the PDF viewer and use anther one. Unfortunately from a developers point of view, this is unacceptable as I will be unable to tell users to disable the previewer. I am asking the group am I doing something wrong, which is causing FireFox's Previewer to choke? basic few lines of code I am using to display the pdf is below. Am I missing something with my headers? Please note that the code works on IE and Chrome, as well as firefox if I change the viewer.

<?php 
    header("Content-type: application/pdf");
    echo $fileData;
?>

页面呈现时如何启用预览器:

How the page renders with previewer enabled:

推荐答案

弄清楚为什么我们在重新发明方面浪费资源(即试图取代Adobe Reader扩展);更不用说到目前为止,我还没有看到一个单一的替代品 - 包括Chrome等 - 它提供了完整的页面动态,格式和查看控件。我们为什么不花这种精力来解决打印界面问题!或者Firefox像筛网一样泄漏并且在错误处理内存请求时发生灾难性崩溃的事实。当然,Chrome也会泄漏,但它确实处理内存请求。例如,一旦分页内存比我的3.5GB系统RAM高出2GB以上,Firefox就会非常可靠地崩溃。但Chrome浏览器在4-5GB页面内存上运行愉快,高于相同的系统RAM,我只重启它,因为系统速度低于有用性;毕竟它只是一个老的奔腾D.这引出了另一点。多年前,我们曾经为他们的英国媒体报道操作系统取笑微软。那么,男孩和女孩,那些相同的笑声现在适用于你所有的现代软件。大会可能会更困难,但肯定会更小,更快。

Frankly I can't figure out why we're wasting resources on re-inventing the wheel (ie, trying to replace Adobe Reader extensions); not to mention that so far I have not seen a single "replacement" -- including Chrome, etc. -- that offers the complete page zooom, format and viewing controls. Why don't we spend that energy on solving the print interface issues!! Or the fact that Firefox leaks like a sieve and crashes catastrophically when it mis-handles memory requests. Sure, Chrome leaks too but it does handle memory requests perfectly. For example, Firefox crashes pretty reliably once the Paged memory gets more than 2GB above my 3.5GB system RAM. But Chrome runs happily at 4-5GB Paged memory above that same system RAM and I only restart it because the system slows below usefulness; it is only an old Pentium D after all. Which brings up another point. Years ago we used to make fun of Microsoft for their "bloatware" OS. Well, boys and girls, those same laughs now apply to all your "modern" software. Assembly might be harder but it sure was smaller and quicker.

这篇关于在Firefox中使用FireFox中的Preview预览显示PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆