Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.0 WPF C#4.0
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 16-Oct-13 0:02am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
Mahesh Alappuzha at 16-Oct-13 5:12am
   
other than Web Browser control
Be Creative at 16-Oct-13 5:13am
   
in desktop application?
Mahesh Alappuzha at 16-Oct-13 6:14am
   
yes
Be Creative at 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)

  Print Answers RSS
0 OriginalGriff 7,205
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,474


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 16 Oct 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100