0

well, my english is not so good, but i will tray to explain me, I have a client requirement when clicking on a button, open the PDF format document of a specific folder and I want to know how can open PDF documents through the name of the folder, for example: I have The following code where I specify the path in which the folder and its file are located, and I show it without any problem:

System.Windows.Browser.HtmlElement myFrame = System.Windows.Browser.HtmlPage.Document.GetElementById("_sl_historyFrame");
            if (myFrame != null)
            {
                myFrame.SetStyleAttribute("width", "1024");
                myFrame.SetStyleAttribute("height", "768");
                Uri uri = new Uri(@"\\192.168.1.216\UploadFileMobilePDF\9977524\29b3e866-e695-4c53-ba33-210f5be74885.pdf");
                string path = uri.AbsoluteUri.ToString();
                myFrame.SetAttribute("src", path);
                myFrame.SetStyleAttribute("left", "0");
                myFrame.SetStyleAttribute("top", "50");
                myFrame.SetStyleAttribute("visibility", "visible");
            }

but what I want to know how to make the PDF show by the name of the folder, for example:

Uri uri = new Uri(@"\\192.168.1.216\UploadFileMobilePDF\" + name_folder);

and then open the PDF documents in that folder (folder_name)

Any answer would be much appreciated, I will be aware

Edgar Rojas
  • 137
  • 6
  • Do you have one PDF document in Folder and you dont know pdf file name right? – Selim Yildiz Sep 08 '19 at 06:46
  • @SelimYıldız yes, I have a pdf document in the folder, I want to do is open the pdfs inside the folder, if the folder exists open the pdfs – Edgar Rojas Sep 08 '19 at 16:35
  • If you want to show all PDFs at once, you could [combine](https://stackoverflow.com/questions/808670/combine-two-or-more-pdfs) them. – user7217806 Sep 08 '19 at 19:53
  • It looks like you answered your own quesiton: `Uri uri = new Uri(@"\\192.168.1.216\UploadFileMobilePDF\" + name_folder);`. (??) – wazz Sep 09 '19 at 09:55
  • @wazz Yes, but I want to know how to open the pdf documents that exist in that folder, do you have any examples of how to do it? – Edgar Rojas Sep 09 '19 at 13:29

0 Answers0