Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Need to view attached document without downloading file.As in Gmail which provides functionality to view file.Please suggest how to implement it in c# or using any 3rd party dll.Please help
Posted
Comments
johannesnestler 3-Sep-13 10:13am    
Hmm - just a quick thought: You can't view anything you don't have - so you allways have to first "load" it (down-/up-/whatever-). Gmail has your email on the server so they can show you a preview before YOU download it to your machine from there site - right?

1 solution

you can try the Bitmap object from System.Windows.Forms:

Bitmap normalBitmap = new Bitmap(filePath);
Image minimizedThumbnail = normalBitmap.GetThumbnailImage(200, 200, ()=>false , IntPtr.Zero);

Good luck!
 
Share this answer
 
Comments
pawanplus 12-Dec-13 0:09am    
I want to preview all types of document (excel, doc, pdf).
Please provide suggestions...
Anil Kumar Panwar 1-Jun-16 0:25am    
Hi, I want to see the preview in the browser itself for following formats doc, docx, xls, xlsx, ppt, pptx, pdf, txt.
Kindly help me.

Thanks In advance..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900