There is no builtin support. You will need a third party library. Google for options.
How to include PDF Viewer in WPF Application
Hi
I have to include the pdf viewer in my wpf application.
- It should have ability to navigate to other pages of pdf.
- It should should pdf in fullscreen mode.
Currently i found no support in wpf . Please help in this case.
2 additional answers
Sort by: Most helpful
-
Castorix3193 40 Reputation points
2024-08-17T10:48:57.7866667+00:00 You can use Windows.Data.Pdf
(I posted samples in C#/WPF with my main account, which seems to have problems...)
-
Hongrui Yu-MSFT 2,465 Reputation points Microsoft Vendor
2024-08-19T07:20:59.98+00:00 Hi,@Vishal2 Bansal. Welcome to Microsoft Q&A.
Set the WPF program to borderless full screen, then use
WebBrowser
to load the PDF, and finally set the PDF reader to a reader with navigation function.Set the Wpf program to borderless full screen.
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); this.WindowStyle = WindowStyle.None; this.WindowState = WindowState.Maximized; this.ResizeMode = ResizeMode.NoResize; } }
Loading Pdf using WebBrowser.
<WebBrowser x:Name="MyBrowser" ></WebBrowser>
string url = "The path to your PDF"; MyBrowser.Navigate(url);
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.