---
title: "在网页中打开pdf文件"
author: "robindut"
date: "2011-12-28T10:34:38Z"
tags: []
categories: ["Web前端"]
slug: "pdf"
draft: false
lastmod: "2011-12-28T10:34:38Z"
id: 1328350
url: "https://robindut.iteye.com/blog/1328350"
---

如果客户端有安装了Adobe reader的话，可以在网页中打开查看pdf文件，代码如下:

```
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="990" height="700" border="0" top="-10" name="pdf"> 
					<param name="toolbar" value="false">
					<param name="_Version" value="65539">
					<param name="_ExtentX" value="20108">
					<param name="_ExtentY" value="10866">
					<param name="_StockProps" value="0">
					<param name="SRC" value="test.pdf">
				<object data="test.pdf" type="application/pdf" width="300" height="200" class="hiddenObjectForIE">   
					<a href="res/papers/<s:property value='paper.filename'></a>"><s:property value="paper.filename"/></a> 
				</object></object>
```