Click here to Skip to main content
Rate this: bad
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
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>");
webBrowser.Navigate(new System.Uri(@"c:\MyPDF.pdf"));
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[^]
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
Be Creative at 16-Oct-13 6:16am
check this links

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

Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 16 Oct 2013
Copyright © CodeProject, 1999-2015
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