I am using Acrobat Reader DC SDK to develope a *.api. Currently I need to get file path and file name. Is there an API like AVDocOpenFromFile to get file path and file name which is Acrobat Reader open file?
AVAppGetOpenDoc. Then to ASFile and ASPathName.
I can not find AVAppGetOpenDoc API in Acrobat Reader DC SDK.
I used ASFileAcquirePathName, get path name is ...\acroab32_sbx\*.tmp. The file is not *.pdf and I copy it out, can not open by reader and the error is "not page".
That suggests the file is unsaved, or a temporary copy. It is not unusual to find TMP names for PDFs that are not saved. Nevertheless, that is the path name. What does File > Properties show for file name? The same or different?
It still has the *.tmp file and it is the same as the file name.
my code like that.
Your code seems correct, and your tests show that this actually is the file path. How is this file opened, exactly? And what are you trying to do with this path name, it sounds as if you are trying to use it outside Acrobat?
yes. I used this API - AVDocOpenFromFile to open one PDF file. It needs to pass this opened pdf file path and name to another exe file which is written by C#. If it is modified by acrobat and how I can pass this modified file name and path to C#.
By default open dialog, I also want to know the file name and path.
Can I use PDDocCreate() and PDDocSave to save tmp file to a new pdf file? But these API is show "unimplemented or obeselte function" when run it.
Does it happen if you turn off Protected Mode?
Also, are you running in Acrobat Reader with an Acrobat Reader plug-ins license from Adobe?
I only run *.api with adobe signed.
I don't understand your reply.
1. Are you running your plugin in Acrobat Reader?
2. Do you have a Reader plug-ins license from Adobe?
yes. I am running api in the acrobat reader. but I also use broker feature to create name pipe and commnicate with another tray windows exe file. I need to pass the opened file which is being opened by adobe reader to tray windows exe file.
the same if turn off protected mode. but I cannot turn off protected mode, I needs broker feature.
I am out of ideas, sorry.
PDDocCreate() is not available in Acrobat Reader.
Then can you give me an idea?
When you use AVDocOpenFromFile() you have the path of the file.
One idea after all. If you OPEN the file in your code, you can record the file name in your code also, so later it is available when you need the name.
yes. I have the paht, but when I use Adobe default open, I don't have the path.
furthermore, if I opened over 2 files, I can not know which one to save.
can I use default save without dialog and get the path name?
sample project - SnippetRunner, it uses PDDocOpen and PDDocSave. But I use it in my project, it shows - unimplemented and obselete function.