This is a migrated thread and some comments may be shown as answers.

RadPdfViewerNavigator: Get selected file location

1 Answer 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
georgi
Top achievements
Rank 1
georgi asked on 05 Jul 2016, 12:58 PM

Hi,

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

thanks

Georgi

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 05 Jul 2016, 02:16 PM
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.
Tags
General Discussions
Asked by
georgi
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or