Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Thu Apr 27, 2017 10:37 am

Hi Everyone,
Hopefully you are doing very well,

I am using your product “Spire.PDFViewer for WPF”. It is very useful for me, I like it.

I have a few quires, please let me know that Is it possible to load PDF file from my local or other sharing network. if we provide username and password of our network? If yes, so please suggest me how can I do this? I would be grateful to you.

Best Regards,
Hamza Jamil

hamza jamil
 
Posts: 1
Joined: Mon Apr 24, 2017 12:28 pm

Fri Apr 28, 2017 6:46 am

Hello Hamaza,

Thanks for your inquiry. I am sorry at present “PdfViewer.LoadFromFile()” method doesn’t have the constructor to load the PDF file via network. But I suggest you convert the network pdf to a stream, then use “LoadFromStream(stream);” to load it. For example:
Code: Select all
            using (WebClient webClient = new WebClient())
            {
                byte[] data = webClient.DownloadData("https://...");
                using (MemoryStream mem = new MemoryStream(data))
                {
                    PdfViewer.LoadFromStream(mem);
                }
            }

If there are any other questions, please feel free to contact us.

Sincerely,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.PDFViewer