开发者

Using PDF In .Net App

开发者 https://www.devze.com 2023-01-21 02:35 出处:网络
Can someone point me to some code/tutorial on how to upload pdf files and store them, the开发者_运维技巧n moreover how to use a pdf reader to display the file as read only in an asp.net application.

Can someone point me to some code/tutorial on how to upload pdf files and store them, the开发者_运维技巧n moreover how to use a pdf reader to display the file as read only in an asp.net application.

Is there a PDF reader already in the visual studio toolbox?


The approach I would use in this situation is to upload the PDF as you would any other file, then use a tool like GhostScript to convert the PDF pages into image files that you can show in ASP .Net.

Here's a tutorial doing that in C# http://www.codeproject.com/KB/cs/GhostScriptUseWithCSharp.aspx


Adobe provides (on acrobat.com) a free service which provides you with the ability to upload pdf (and also other types like doc...) and then embed a nice flash interface for displaying the files on your page.

It's pretty helpful as you can store some 5 gigs of files here.

But if you want to let the users upload their own files then this won't help you.


PDF is a final format file, ie its is read-only for the most part and can be embedded into the page via the <object> tag, except if you mean downloadable by the user.

Displaying PDF is generally done by rasterising to an image format for display (ie as an image on the page or via a richer interface (with zooming etc) through flash/silverlight etc.

You can use [GhostScript][1] to interpret PDF files and convert them to an image.

[1]: http://www.GhostScript .com


Uploading a PDF is just like any other file. Use the ASP.NET file uploader control:

http://www.codeproject.com/KB/aspnet/fileupload.aspx

In order to view the PDF in an ASP.NET application, you could either depend on Acrobat being there or use a PDF Viewer control.

The company I work for, Atalasoft, sells a PDF Reader add-on to our web viewer controls. You can learn more here: http://www.atalasoft.com/products/dotimage/pdf-reader

0

精彩评论

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