无法在浏览器中打开PDF [英] unable to open PDF in browser

查看:383
本文介绍了无法在浏览器中打开PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,







在我们的网络应用程序中,我们使用的是activePDF工具包(第三方)组件)即时填写PDF格式的承运人表格。



当在最终用户的浏览器(IE)上用adobe reader 8,9和10打开时,上面库处理的输出文件工作正常;但是,用adobe reader 11打开时会出现以下错误。





文件不以''%pdf - ''开头br $> b $ b





到目前为止,我们已经在IIS级别,Internet Explorer等尝试了不同的设置建议在不同的互联网帖子。但是,我们仍然面临着这个问题。

Hi All,



In our web application we are using activePDF toolkit (3rd party component) to fill up carrier forms on the fly which are PDF files.

The output file processed by the above library works fine when opened with adobe reader 8, 9 and10 on end user’s browser (IE); however, it gives below error when opening with adobe reader 11.


file does not start with ''%pdf-''



Till now, we have tried different settings at IIS level, Internet explorer e.t.c. suggested on different internet posts. However, we are still facing the problem.

推荐答案

首先要注意的是:PDF不是W3标准的一部分。尽管许多浏览器都支持DPF查看器,但它是通过插件完成的,但绝不保证。



作为ASP.NET开发人员,你绝不​​能假设用户可以在浏览器中查看PDF文档,但浏览器将始终建议用户下载或使用在本地系统中为此文件类型注册的默认应用程序打开它。仅此而已。



或者,如果您真的想在浏览器中显示文档,可以将其翻译成HTML。



-SA
First thing you should understand is: PDF is not a part of W3 standards. Even though many browsers support DPF viewers, it is done via plug-ins and never guaranteed.

As an ASP.NET developer, you should never assume that the user can view the PDF document in browser, but the browser will always suggest a user to download it or open it with the default application registered in local system for this file type. No more than that.

Alternatively, if you really want to show the document in browser, you can translate it into HTML.

—SA


这篇关于无法在浏览器中打开PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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