开发者

PDF Binary Display on Page [closed]

开发者 https://www.devze.com 2022-12-08 17:02 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question 开发者_StackOverflow中文版

I have a Binary Store in a SQL Server Table, In there I have PDF Files (in binary), what I want to do is display the PDF on a webpage in a "DIV". I don't want the user to have to press open so it opens in acrobat reader. I want a small thumbnail which they click and a model window opens with the PDF document displayed as a picture. Does anyone know how to achieve this or if there are any components available to do this?


To display a PDF within the browser you will need to use the <object> or <embed> html tags.

You can use this to point to a PDF file URL to display.

If you PDF is located in a Binary Store somewhere and not linkable from a browser, you will need to build a page (or HttpHandler) to get the binary data and output the file contents so it can be linked via a URL. Have a look at serving files using "Response.Binarywrite".


You're looking for rasterization. I've used DynamicPDF's rasterizer with good success, but it's not cheap.


It looks like PDF.js might be of use to you, a JavaScript library that renders the PDF to a HTML5 canvas.


We found TallComponents PDF Rasterizer very useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消