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

Disable warning popups in ActionWizard

Community Beginner ,
Jul 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

When automating conversion of PDFs to plaintext with ActionWizard, I run a Javascript action calling doc.saveAs. Several times per document, a popup saying "Some difficult pages were encountered...", requiring a user click and ruining the automation. I have thousands of documents, so that's not ok. How do I disable them? Thanks much.

TOPICS
JavaScript

Views

486

Translate

Translate

Report

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 ,
Jul 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

I doubt that you can disable these popups: Acrobat is not designed as a server appliation. Even with all the automation tools, it expecrts that somebody sits in front of the screen and takes care of error messages and warnings. If you need something that works in a "lights out" mode, you need to look for a different solution. 

Votes

Translate

Translate

Report

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 ,
Jul 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

Very true, although unfortunately Adobe's server applications are also not designed as server applications, so that's what I got. The warnings don't require any input besides clicking 'ok', so they could just as well be written to the log. Someone in 2016 said they had found the solution, but did not post what it was, so I have a sliver of hope.

Votes

Translate

Translate

Report

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 ,
Jul 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

You can try placing your code within a try-catch clause. If the error is catchable (not all are) then you could just output it to the console and move on.

Votes

Translate

Translate

Report

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 ,
Jul 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

Thanks try; however I don't think it would work - saveAs is atomic from the user point of view, so it would require modifying Adobe's code to catch the warning at the required place. I am going to check if it's possible to modify the included JS libraries, although I'm not hopeful.

(also, your user name checks out 🙂

Votes

Translate

Translate

Report

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 ,
Jul 07, 2021 Jul 07, 2021

Copy link to clipboard

Copied

Have you tried it? Also, can you share a sample file with us? There might be other ways of detecting this issue, such as trying to read the contents of the page, or something like that.

Votes

Translate

Translate

Report

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

LATEST

Just did, no dice. I checked the files open by the AcrobatDC process for anything interesting, no dice either. My action, aside from path setting, is only two doc.saveAs(), which leave little room for clever error management.

 

I fear I can't share a doc, unfortunately. They're books (to which my company has the copyright, to be sure), and that's not kosher. I've however found out that if I extract the pages of the PDF and save as-is (so basically saving the PDF as itself), and then convert to text, the warnings disappear - but only if using the native action, not the Javascript call. That would solve the practical problem, if rather unsatisfyingly.

 

I've also found out that save as text and export to text give different results. I have no idea WTF is going on in Acrobat's internals.

Votes

Translate

Translate

Report

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