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

Javascript save as..

Explorer ,
Apr 04, 2022 Apr 04, 2022

I am a novice with javascript.

I wonder if it is possible to save a pdf and open the save as... dialog screen.

I am splitting pdf's an must rename them.

 

what I am doing now is extract the page (with javascript) and manualy go to save as..

TOPICS
How to , JavaScript
1.5K
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
1 ACCEPTED SOLUTION
Community Expert ,
Apr 04, 2022 Apr 04, 2022

You can execute a menu item from within Javascript: https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

That would allow you to open the Save As window, but you would not be able to populate any information on that dialog. 

View solution in original post

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 ,
Apr 04, 2022 Apr 04, 2022

You can extract a page into a new document, and then save that new document in JavaScript. Take a look at these two API calls: 

 

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

The "extractPages()" function actually has an optional parameter to save under a new filename. 

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
Explorer ,
Apr 04, 2022 Apr 04, 2022

This is what I am doing now.

 

I was hoping there is a way to open the dialog save as.. before the saving to a new document.

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 ,
Apr 04, 2022 Apr 04, 2022

You can execute a menu item from within Javascript: https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

That would allow you to open the Save As window, but you would not be able to populate any information on that dialog. 

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
Explorer ,
Apr 04, 2022 Apr 04, 2022
LATEST

Thank you.

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