Category / Section
How to read the PDF document from the remote URL and display it in WPF PDFViewer control?
1 min read
You can access the PDF document from Remote URL as stream using WebClient and then display the same in WPF PDFViewer control.
C#
WebClient client = new WebClient(); byte[] myDataBuffer = client.DownloadData((new Uri("<<<<<PDF Document Link>>>>>"))); MemoryStream storeStream = new MemoryStream(); storeStream.SetLength(myDataBuffer.Length); storeStream.Write(myDataBuffer, 0, (int)storeStream.Length); pdfViewer.Load(storeStream); storeStream.Flush();