Load PDF file from local or other sharing network

Technical support for Spire.PDFViewer

Moderator: iceblue support

Load PDF file from local or other sharing network

Postby hamza jamil » 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

Re: Load PDF file from local or other sharing network

Postby Simon.yang » 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: 45
Joined: Wed Jan 11, 2017 2:03 am


Return to Spire.PDFViewer

Who is online

Users browsing this forum: No registered users and 0 guests