How to Automatically Name Digitally Signed PDF Documents
Question details
The user wants to automatically name and save a PDF document immediately after applying a digital signature, and bypass the manual 'Save As' dialog.

- Product
- Device & OS
- not provided
- Scenario
- Applying a digital signature to a form and submitting it via email or saving it locally.
- Observed behavior
- The PDF software triggers a mandatory 'Save As' dialog immediately upon applying the digital signature, which interrupts automated workflow submissions.
Before attempting to automate PDF saves, ensure you have a valid digital certificate configured and administrative privileges to install local folder-level JavaScript files.
Use a Local Folder-Level Script
Create a local JavaScript to utilize the signature field's Signed event, automatically applying a predefined file name.
To automate the naming process, you must bypass the standard document-level restrictions by placing a custom script directly into the local application's JavaScript folder.
This script can extract the current date and time to generate a unique predefined name when the Signed event is triggered.
Navigate to the installation directory of your PDF software and locate the local 'JavaScripts' folder.
Write a `.js` file containing a trusted function that uses the 'app.execMenuItem' or specific save commands to rename the document.
Open your PDF form, go to the signature field's properties, and set the Signed event to trigger your custom script.
Combine Signature with a Mouse Up Email Action
Use a streamlined workflow that applies the digital signature and instantly prepares the form for email submission.
Sign and Manage PDFs Effortlessly with WPS Office
While advanced script automation can be complex and restricted by local permissions, WPS PDF offers a highly intuitive interface for adding digital signatures, securing documents, and handling forms without unnecessary technical hurdles.
- 1. Open your PDF: Launch WPS Office and open the PDF document that needs to be signed.
- 2. Access signature tools: Navigate to the 'Protect' or 'Fill & Sign' tab on the top ribbon.
- 3. Apply signature: Click 'Sign Document', select your digital ID, and click on the document to place your signature securely.
- 4. Save the document: Click the Save icon to embed the cryptographic signature into your file seamlessly.

Frequently Asked Questions
Why does signing a PDF force a Save As dialog?
When you apply a digital signature, the PDF application must calculate and secure the cryptographic hash of the document exactly as it is at that moment. Forcing a immediate save prevents any post-signing alterations that would invalidate the signature.
Can I completely bypass the Save As prompt when digitally signing a PDF?
Generally, no. Most secure PDF applications mandate a save action when a digital signature is applied to preserve the signature's integrity. While local scripts can pre-fill the file name, the final confirmation prompt is a built-in security measure.
How do I add a date and time to my automatically saved PDF filename?
You can achieve this by writing a folder-level JavaScript that extracts the current system date and time using the `new Date()` function. The script then formats these values and appends them to the document's file name property before calling the save command.




