RadPdfViewerNavigator: Get selected file location

2 posts, 1 answers
  1. georgi
    georgi avatar
    2 posts
    Member since:
    Nov 2013

    Posted 05 Jul Link to this post

    Hi,

    how can I get the user selected PDF file location from RadPdfViewerNavigator?

    thanks

    Georgi

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 05 Jul Link to this post

    Hello Georgi,

    Thank you for writing.

    Currently, this functionality is not supported by RadPdfNavigator. However you can add a custom open button and save the path and name:
    string fileName;
    string filePatch;
    private void radButton1_Click(object sender, EventArgs e)
    {
        OpenFileDialog openFileDialog = new OpenFileDialog();
        openFileDialog.Filter = "PDF Files|*.pdf";
        openFileDialog.Title = "Select a PDF File";
        if (openFileDialog.ShowDialog() == DialogResult.OK)
        {
            radPdfViewer1.LoadDocument(openFileDialog.FileName);
            radPdfViewerNavigator1.UpdatePageCount();
            fileName = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('\\')+1);
            filePatch = openFileDialog.FileName.Substring(0,(openFileDialog.FileName.Length - fileName.Length));
      
        }
         
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top