Click here to Skip to main content
12,822,497 members (45,135 online)
Rate this:
Please Sign up or sign in to vote.
See more: .NET3.0 C# .NET 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 16-Oct-13 5:12am
other than Web Browser control
Be Creative 16-Oct-13 5:13am
in desktop application?
Mahesh Alappuzha 16-Oct-13 6:14am
Be Creative 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)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 16 Oct 2013
Copyright © CodeProject, 1999-2017
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