Page 1 of 1

JavaScript to save all documents (tabs) in window to one location

Posted: Fri Dec 13, 2024 2:13 pm
by MedBooster
JavaScript to save all documents (tabs) in window to one location (folder/file path)

Would anyone be up for the challenge?

You see, as previously mentioned (in other threads), sometimes "save all" works for "unsaved" opened documents, other times it doesn't, so this would really save some time.

Hmm... maybe a save as dialogue could appear for the 1st document, and then the rest could just automatically be saved to the same file path (folder) as the first?

Re: JavaScript to save all documents (tabs) in window to one location

Posted: Mon Dec 16, 2024 5:38 pm
by Daniel - PDF-XChange
Hello, MedBooster

I expect that starting a "save as" action for all open documents could be possible, but I am not so sure that inheriting the selected location as the target folder would be. I wish you luck in your search with this. As per usual, I cannot help with writing new JS.

Kind regards,

Re: JavaScript to save all documents (tabs) in window to one location

Posted: Fri Jan 17, 2025 10:45 am
by MedBooster
Master Mathew, any advice? Maybe you would consider making such a script for PDF-XCE?


I'm getting annoyed with such errors when batch saving multiple PDF-documents for the first time... I end up having to save each file manually

Half of the time I am able to just chose save all and I will be asked for each and I just have to press Enter a few times, that's easier, but a JavaScript could possibly work around this, right?
image.png
↑error from using save all with documents not saved yet (doesn't happen all the time, maybe 20% of the time

Re: JavaScript to save all documents (tabs) in window to one location

Posted: Thu Jan 23, 2025 5:50 am
by Vasyl - PDF-XChange
You see, as previously mentioned (in other threads), sometimes "save all" works for "unsaved" opened documents, other times it doesn't, so this would really save some time.
Do you mean this feature:
image.png
?

Does this one sometimes not work? If yes - can you explain how to reproduce the problem(s)?

Re: JavaScript to save all documents (tabs) in window to one location

Posted: Thu Jan 23, 2025 6:02 am
by Vasyl - PDF-XChange
It appears you are using an older version, as the current version shows which program locked the file and caused the AccessDenied error...