You reached the maximum number of files that can be opened.

Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

Hi,
I'm writing a JavaScript action that creates a new file in a loop with var newDoc=app.newDoc(); and close this file at the end of the loop with newDoc.closeDoc();

This action works fine... until the 49th file, then I have a message in the console window (in French):
Vous avez atteint le nombre maximum de fichiers pouvant être ouverts. Vous devez fermer certains fichiers avant de pouvoir en ouvrir ou en imprimer d'autres.
That means: You reached the maximum number of files that can be opened. You must close some files before opening or printing other ones.

What I don't understand because the files are not open!!! It is certainly necessary to empty a variable or a memory somewhere.

Does anybody have an idea?

Thanks in advance

bernard

TOPICS
Acrobat SDK and JavaScript, General troubleshooting, How to, PDF forms

Views

890

Likes

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

You reached the maximum number of files that can be opened.

Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

Hi,
I'm writing a JavaScript action that creates a new file in a loop with var newDoc=app.newDoc(); and close this file at the end of the loop with newDoc.closeDoc();

This action works fine... until the 49th file, then I have a message in the console window (in French):
Vous avez atteint le nombre maximum de fichiers pouvant être ouverts. Vous devez fermer certains fichiers avant de pouvoir en ouvrir ou en imprimer d'autres.
That means: You reached the maximum number of files that can be opened. You must close some files before opening or printing other ones.

What I don't understand because the files are not open!!! It is certainly necessary to empty a variable or a memory somewhere.

Does anybody have an idea?

Thanks in advance

bernard

TOPICS
Acrobat SDK and JavaScript, General troubleshooting, How to, PDF forms

Views

891

Likes

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
Dec 13, 2019 0
Most Valuable Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

There's a bug in some versions of Acrobat DC that causes the closeDoc method to not work. Try updating to the latest version available. If that doesn't work you'll need to look for a workaround.

Likes

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
Reply
Loading...
Dec 13, 2019 0
Adobe Community Professional ,
Dec 13, 2019

Copy link to clipboard

Copied

Why does you create so many new documents?

Likes

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
Reply
Loading...
Dec 13, 2019 0
Adobe Community Professional ,
Dec 13, 2019

Copy link to clipboard

Copied

Tu ne devrais pas mettre ton email en pseudo : tu vas te faire spammer !

😉

Likes

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
Reply
Loading...
Dec 13, 2019 0
Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

Merci jean-Renaud, j'ai modifié mon "Nom Adobe" mais c'est toujours mon adresse e-mail qui apparaît. Peut-être n'est-ce pas immédiat !!!

 

I am writing this action for somebody who wants to customize the forms from an Excel database.

So I have an original form with an attached .csv file so for each row I create a new file and I fill the field from these datum then I close the new file.

I though 2 solutions: the one I did and an other one is to generate an array of arrys containing the datum before removing the attached file then save as the file with the datum of the arrays. That should avoid several files open at the same time!

Thanks for your answers.

@+

Likes

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
Reply
Loading...
Dec 13, 2019 0
bebarth LATEST
Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

The second method works very well with the 110 lines of the Excel file. It generates 110 customized forms without any problems.

@+

Likes

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
Reply
Loading...
Dec 13, 2019 0