Skip to main content
doobeedoobee
Known Participant
Apr 15, 2017 6:22 AM UTC
Question

How do I save a file with JS

Hi. I have a PDF with a script that opens another file, changes that file's serial number and prints the file. How do I save the file so the new serial number is saved? Thanks very much

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Karl Heinz  Kremer
Community Expert
Community Expert
Apr 15, 2017 12:13 PM UTC

Take a look at this tutorial, it explains how to save PDF files using JavaScript: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

You will have to install a folder level script.

Translate
doobeedoobee
Known Participant
Apr 15, 2017 1:17 PM UTC

Thanks Karl. I'll work through it

Translate
Bernd Alheit
Community Expert
Community Expert
Apr 15, 2017 8:53 AM UTC

Use the method saveAs.

Translate
doobeedoobee
Known Participant
Apr 15, 2017 11:17 AM UTC

Thanks. I'll try that. I assume you mean that I just save it using the same name and that there's a way of doing it without a dialog box confirming you want to overwrite the pre-existing file

Translate