Click here to Skip to main content
15,174,182 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi how can i create an application that preview word and jpg and pdf files ,for example the files are in the left corner and preview in right corner.when you click on a file in pdf or word or jpg format thats content show in right corner.help me please
Posted
Comments
   
Tag it! WPF, Forms, ASP.NET, what?!
--SA

1 solution

For PDF support, use iText: http://en.wikipedia.org/wiki/IText[^], http://itextpdf.com/[^]. A .NET port named iTextSharp is available, see http://sourceforge.net/projects/itextsharp/[^].

For Word support, use Microsoft Office Interop library, see:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word%28v=office.14%29.aspx[^],
http://msdn.microsoft.com/en-us/library/hy7c6z9k.aspx[^],
http://msdn.microsoft.com/en-us/office[^],
http://msdn.microsoft.com/en-us/library/kh3965hw%28v=VS.100%29.aspx[^].

The JPEG format is directly supported in System.Drawing and Windows.Media.Imaging (WPF); you will find all you need. As you only need to preview the bitmap, you can use System.Drawing.Bitmap or classes derived from System.Windows.Media.Imaging.BitmapSource. See:
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx#inheritanceContinued[^].

In your questions to CodeProject, please always tag the UI library you want to use where applicable. Nobody wants to waste time for double or triple answer.

—SA
   
v2
Comments
Abhinav S 4-Sep-11 3:48am
   
Detailed. 5.
   
Thank you, Abhinav.
--SA

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