Pages

Friday, 29 May 2026

Adobe pdf file keeps opening print dialogue

I had an interesting problem recently. I was sent an 'official' file which, each time opened the file, would also open the printer dialogue box. In order to read the file, I would have to dismiss the dialogue box (which - while minor - was still rather irritating).

After repeatedly closing the dialogue box each time I opened the file, I decided that I should track down what the problem was and solve it. The first solution was to disable javascript. So I went to the Edit menu, selected Preferences, and navigated to the Javascript item in the list in the lefthand pane. In that sub-menu, I unticked "Enable Acrobat Javascript" (Kit, 2011). Then each time I opened the file I now got an error message asking me if I knew that I had disabled javascript. Sigh: from one annoying popup to another.

On the hunt again, I found a solution for a different problem, which inadvertently solved mine. This user's problem was "When opening some PDF files stored on Onedrive, Adobe Reader (latest version) switches to the Print dialog. The PDF is not opened. If I print and save a new PDF at that point, the new PDF opens. How can this be fixed?" (Jan28787298lb6s, 2023), with one of the suggested solutions to that problem being as follows:

  1. Open the pdf
  2. Go to the Tools options and scroll right down to the end, and click on "Javascript". 
  3. A toolbar will appear in the normal toolbar position, where we then select "Document Javascript" button. That will pop up the "Document Javascript" dialogue box.
  4. Here we click on edit, which opens the "Javascript Editor" dialogue. 
  5. Once open, we click into the "Create and Edit JavaScripts" field, and replace "this.print()" with two forward slashes (i.e. "//" but without the speech marks).
  6. Now we click OK. 
  7. And save. And close.


The next time we open our file, hopefully we will find that dratted print screen dialogue box will no longer be with us (Jan28787298lb6s, 2023).

At least, that is what happened for me :-)


Sam

References:

Kit. (2011, March 29). Opening a PDF brings up the Print dialog. SuperUser. https://superuser.com/questions/263842/opening-a-pdf-brings-up-the-print-dialog

Jan28787298lb6s. (2023, March 9). Adobe Acrobat Reader opens print dialog when PDFS are opened. Adobe Community. https://community.adobe.com/t5/acrobat-reader-discussions/adobe-acrobat-reader-opens-print-dialog-when-pdfs-are-opened/td-p/13637207

No comments :

Post a Comment

Thanks for your feedback. The elves will post it shortly.