Fix Acrobat Automatically Opening Print Dialog in Remote Desktop
Question details
The user needs to stop the print dialog box from appearing automatically every time a PDF label is generated on remote desktop servers.

- Product
- Adobe Acrobat
- Device & OS
- Windows Server / Remote Desktop (RDS)
- Scenario
- Generating PDF labels in a Remote Desktop session after a software update.
- Observed behavior
- A print dialog unexpectedly appears for every generated PDF file in the RDS environment, whereas the workflow operates normally on local computers.
Ensure you have the necessary administrative privileges to change Acrobat application preferences in your Remote Desktop environment.
Disable JavaScript to Prevent Auto-Print Scripts
Identify and block embedded scripts that trigger the print dialog automatically upon opening a PDF.
PDF files can contain embedded document-level JavaScript that executes as soon as the file is opened. Disabling JavaScript prevents these scripts from calling the print dialog without user initiation.
Launch Adobe Acrobat in your Remote Desktop session. Go to 'Edit' in the top menu bar (or the Acrobat application menu on macOS) and select 'Preferences'.
In the Preferences window, scroll down the categories in the left panel and click on 'JavaScript'.
Uncheck the box that says 'Enable Acrobat JavaScript'. Click 'OK' to save your changes and close the Preferences window.
Generate a new label or open the affected PDF to confirm that the print dialog no longer appears automatically.
Investigate RDS Printer Redirection and Configurations
Ensure the Remote Desktop server's printing environment and calling applications are not forcing the print prompt.
Use WPS PDF for Seamless Label Printing on Remote Desktops
WPS Office includes a lightweight, secure PDF reader that bypasses unwanted Adobe-specific JavaScript triggers. It provides a stable and fast PDF viewing experience, making it an excellent alternative for Remote Desktop servers handling automated label generation.
- 1. Install WPS Office on the Server: Download and install WPS Office on your Remote Desktop server or virtual environment.
- 2. Set as Default PDF Viewer: Right-click any PDF label file, choose 'Open with', select 'WPS PDF', and check 'Always use this app to open .pdf files'.
- 3. Generate and View Labels: Run your label generation workflow. WPS PDF will open the files securely without triggering unauthorized auto-print dialogs.

Frequently Asked Questions
Why does my PDF try to print automatically when opened?
This behavior is typically caused by a document-level JavaScript embedded within the PDF itself. The creator of the PDF or the generating software added a script (like 'this.print()') that tells the PDF viewer to open the print dialog immediately.
Does disabling JavaScript in Acrobat affect other PDF features?
Disabling JavaScript will stop auto-print scripts, but it may also disable interactive elements in complex PDFs, such as form field calculations, dynamic stamps, or custom validation rules. For standard shipping or product labels, disabling it usually has no negative impact.
How do I permanently remove the print script from my PDF?
If the PDF is not password-protected, you can remove the script using Acrobat Pro. Go to 'Tools' > 'JavaScript' > 'Document JavaScripts', locate the print script, and delete it. Save the file to apply the changes.
Why does this auto-print issue only happen on my Remote Desktop server?
The difference in behavior often stems from different application preferences. Your local computer might already have Acrobat JavaScript disabled, or it might be using a different default PDF viewer. Software updates on the RDS environment might have reset Acrobat preferences to their defaults, re-enabling JavaScript.




