Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to get the opened file path and file name for Acrobat Reader DC SDK

Community Beginner ,
Dec 09, 2020 Dec 09, 2020

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 

TOPICS
Acrobat SDK and JavaScript
6.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 10, 2020 Dec 10, 2020

AVAppGetOpenDoc. Then to ASFile and ASPathName.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 10, 2020 Dec 10, 2020

I can not find AVAppGetOpenDoc API in Acrobat Reader DC SDK.

 

thanks,

tony

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 10, 2020 Dec 10, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 11, 2020 Dec 11, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 13, 2020 Dec 13, 2020

It still has the *.tmp file and it is the same as the file name.

thanks,

tony

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 13, 2020 Dec 13, 2020

li0D4C_0-1607924285607.png

my code like that.

thanks,

tony

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2020 Dec 14, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2020 Dec 14, 2020

Does it happen if you turn off Protected Mode?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2020 Dec 14, 2020

Also, are you running in Acrobat Reader with an Acrobat Reader plug-ins license from Adobe?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

I only run *.api with adobe signed.

thanks,

tony

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2020 Dec 14, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

the same if turn off protected mode. but I cannot turn off protected mode, I needs broker feature.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2020 Dec 14, 2020

I am out of ideas, sorry.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 14, 2020 Dec 14, 2020

PDDocCreate() is not available in Acrobat Reader.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

Then can you give me an idea?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 14, 2020 Dec 14, 2020

When you use AVDocOpenFromFile() you have the path of the file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 14, 2020 Dec 14, 2020

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

yes. I have the paht, but when I use Adobe default open, I don't have the path.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

furthermore, if I opened over 2 files, I can not know which one to save.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

can I use default save without dialog and get the path name?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 14, 2020 Dec 14, 2020

sample project - SnippetRunner, it uses PDDocOpen and PDDocSave. But I use it in my project, it shows - unimplemented and obselete function.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines