0

I'm looking for a solution , I want to view a pdf file on a windows form C# from a remote server / url.

Is this doable?

2 Answers2

0

Check this out. I'm using the PDF Viewer control by DevExpress to display PDF documents within the app.

using System.Net;

string Url = "YOUR_URL";
using(WebClient client = new WebClient()) {
    using(MemoryStream ms = new MemoryStream(client.DownloadData(Url))) {
        pdfViewer1.LoadDocument(ms);
    }
}
Max
  • 47
  • 2
0

Whilst using windows you should get the most consistent support using the native PDF engine which from Windows 7 (however depreciating as EOL) to 11 is MSEdge this can be integrated into WebView 2

enter image description here and the best place to see starter and example code is at

https://learn.microsoft.com/en-us/microsoft-edge/webview2/code-samples-links#sample-code-for-get-started-guides

the github location is

https://github.com/MicrosoftEdge/WebView2Samples

K J
  • 8,045
  • 3
  • 14
  • 36