Click here to Skip to main content
16,018,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a PDF file. I want to display in WPF (other than the Web Browser control )

how do I tell it to display as a pdf ?
Posted

1 solution

You can try below code :
webBrowser1.NavigateToString(@"<HTML><IFRAME SCROLLING=""YES"" SRC=""MyPDF.pdf""></IFRAME></HTML>");
Or
webBrowser.Navigate(new System.Uri(@"c:\MyPDF.pdf"));
Or
string GuidePath = @"./Resources/Guide/LogViwer User Manual.pdf";
Or refer the answers of this question
How to Display PDF file in Canvas In WPF[^]
open a pdf file on button click in wpf application[^]
MoonPdfPanel - A WPF-based PDF viewer control[^]
 
Share this answer
 
Comments
Mahesh Alappuzha 16-Oct-13 5:12am    
other than Web Browser control
bjdestiny 16-Oct-13 5:13am    
in desktop application?
Mahesh Alappuzha 16-Oct-13 6:14am    
yes
bjdestiny 16-Oct-13 6:16am    
check this links
http://code.msdn.microsoft.com/windowsdesktop/PDF-File-Reader-WPF-Ribbon-139b6fef
http://www.componentone.com/SuperProducts/StudioWPF/

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