views:

117

answers:

2

Is it possible to retrieve the path of a pdf file opened in adobe reader using C# code?

A: 

This article discusses how to enumerate all open handles. It would be possible to use pinvoke to do this from C# (although maybe the functionality is accessible more "natively" in .net). Using this information, it would be possible to retrieve an open file. However, it is possible that the adobe reader process opened the file, read it, and then closed it. If that is the case, then it would be a little more difficult to find the information.

Mark Wilkins
A: 

Use COM interop to access Acrobat's typelibrary from C#.

You could try getting the active document with the AcroApp.GetActiveDoc method, and then discover the filename with AcroPPDoc.GetFilenName. Perhaps.

AffineMesh94464