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

Bulk pdf's export to png by sequence

Explorer ,
Mar 15, 2017 Mar 15, 2017

Can anybody tell me what's wrong with following sequence?

Result when starting is a window that appears to overwrite the current pdf while I want a new created png file of that current pdf file.

I have hundreds of pdf's and a sequence would be helpful.

var re = /.*\/|\.pdf$/ig;

    var filename = this.path.replace(re,"");

    this.saveAs(filename + ".png","com.adobe.acrobat.png");

Kind regards

TOPICS
Acrobat SDK and JavaScript
692
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

correct answers 1 Correct answer

Explorer , Mar 15, 2017 Mar 15, 2017

So, the script did not do anything in my case. I did not change anything on the script, but then I went to dig into some other settings.

Capture.JPG

I have chosen following output settings.

Result is ok!

Do not ask me why the script doesn't do the same... That's still an open question for me.

Translate
Community Expert ,
Mar 15, 2017 Mar 15, 2017

Works fine for me... Are you running this script as a part of an Action?

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 ,
Mar 15, 2017 Mar 15, 2017
LATEST

So, the script did not do anything in my case. I did not change anything on the script, but then I went to dig into some other settings.

Capture.JPG

I have chosen following output settings.

Result is ok!

Do not ask me why the script doesn't do the same... That's still an open question for me.

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 ,
Mar 15, 2017 Mar 15, 2017

I created a new sequence (see capture1)

Capture1.JPG

The code can you find in my first call.

When I run the sequence, following message appears:

Capture2.JPG

My conclusion was: something is wrong with script because the pop-up says that the pdf will be overwritten.

The problem still occurs as you can see above. No png is created at all. Acrobat X professional is used, friday update to DC.

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 ,
Mar 15, 2017 Mar 15, 2017

I would set the Save To setting in the Action to "Do not save", since you're already doing it with your code...

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