We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PDFViewer - Return the path\filename

Hi guys,

This might sound like a silly question - but how can I get the file/path of the document presently open in the PDF Viewer ?

If I load a document as a stream, and display it in the PDF Viewer and then allow a user to save it to the disk drive ... how can I know what filename/path the user has used ?

I could not find any reference in the object browser or other forms of help.

Many thanks in advance.

DWE

Edit: I see the question has been asked here and this feature was scheduled for inclusion in May 2018 ... did that occur?

3 Replies

KK Karthik Krishnaraj Syncfusion Team December 18, 2018 01:07 PM UTC

Hi Darrin, 
 
Greetings from Syncfusion, 
 
We have the API to access the filename and filepath of the loaded PDF document in PDF Viewer control.  You can find the below API to access the filename/path of the loaded PDF document. 
 
string filename = pdfViewerControl.DocumentInformation.FileName; 
string filepath = pdfViewerControl.DocumentInformation.FilePath; 
 
 
However, if you load the document as stream we cannot get the filename/file path. This is the behavior of our PDF Viewer control. Also, we would like to know the use case of your requirement to load document as stream and to retrieve the file path. It will be helpful for us to analyze further and provide better solution. 
 
 
Regards, 
Karthik. 



DE Darrin Edwards December 18, 2018 09:53 PM UTC

Karthik, thank you for your response - its answers my query.


KK Karthik Krishnaraj Syncfusion Team December 19, 2018 12:27 PM UTC

Hi Darrin, 
 
We are glad to know that provided solution helps. Please let me know if you have any other query. 
 
Regards, 
Karthik. 


Loader.
Live Chat Icon For mobile
Up arrow icon