Copy link to clipboard
Copied
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?
thanks,
tony
Copy link to clipboard
Copied
AVAppGetOpenDoc. Then to ASFile and ASPathName.
Copy link to clipboard
Copied
I can not find AVAppGetOpenDoc API in Acrobat Reader DC SDK.
thanks,
tony
Copy link to clipboard
Copied
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".
thanks,
tony
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
It still has the *.tmp file and it is the same as the file name.
thanks,
tony
Copy link to clipboard
Copied
my code like that.
thanks,
tony
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
thanks,
tony
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Does it happen if you turn off Protected Mode?
Copy link to clipboard
Copied
Also, are you running in Acrobat Reader with an Acrobat Reader plug-ins license from Adobe?
Copy link to clipboard
Copied
I only run *.api with adobe signed.
thanks,
tony
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
the same if turn off protected mode. but I cannot turn off protected mode, I needs broker feature.
Copy link to clipboard
Copied
I am out of ideas, sorry.
Copy link to clipboard
Copied
PDDocCreate() is not available in Acrobat Reader.
Copy link to clipboard
Copied
Then can you give me an idea?
Copy link to clipboard
Copied
When you use AVDocOpenFromFile() you have the path of the file.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
yes. I have the paht, but when I use Adobe default open, I don't have the path.
Copy link to clipboard
Copied
furthermore, if I opened over 2 files, I can not know which one to save.
Copy link to clipboard
Copied
can I use default save without dialog and get the path name?
Copy link to clipboard
Copied
sample project - SnippetRunner, it uses PDDocOpen and PDDocSave. But I use it in my project, it shows - unimplemented and obselete function.