29

I have some PDF's which, when I double-click to open, automatically bring up the Print dialog box in Adobe Reader X. I'm on Windows XP. I think this is because of some code within the PDF itself. Is there some way I can disable such automatic printing from Adobe Reader?

9 Answers 9

24

If it's happening only with some specific files then it's probably because:

You can tie Acrobat JavaScript code to a specific PDF document, a page, field, or button within that document, or a field or button within the PDF file, and even to a user action

You can disable javascript in Adobe Reader:

  • Open Edit -> Preferences
  • Click on Javascript on the left-hand pane
  • Uncheck Enable Acrobat Javascript on the right-hand pane
2
  • Added the instructions for deleting the script from the PDF file, from user218924's answer as edited by @Kazark. This makes one answer tell the whole story. May 31, 2019 at 21:46
  • I was able to apply this solution with Foxit. I opened the file, canceled the printing, turned off the Javascript in the preferences, saved the file, and then when I opened the file again the problem was solved. The fix stuck even when I turned javascript back on again. Oct 1, 2019 at 23:01
23

Open in Adobe Acrobat. Goto tools > Javascript > choose "Document Javascripts". Then a dialog box pops up. There will be this.print() code with a corresponding script name (0 in my case). Just press delete botton in the dialog box and save.

4
  • 5
    Can you do this with Adobe Reader, or do you need the full Acrobat version?
    – wisbucky
    Jan 25, 2014 at 22:41
  • 3
    This should be the accepted answer as it explains where the actual cause is and how to remove it. The accepted answer suggests modifying Acrobat preferences to disable that feature, which is not a solution, just a workaround. May 18, 2017 at 20:42
  • In Adobe Acrobat 8 Professional the path is a bit different: Advanced > Document Processing > Document JavaScripts... > Press Delete in the pop-up dialog. Jul 27, 2018 at 6:38
  • This answer is incomplete, in that you have to turn off Enable Acrobat Javascript as @Sim K's answer says, in order to get past the print dialogue. (My document's script called this.print(); followed immediately by this.close().) I am going to add this answer's instructions to the accepted answer, to have one answer which gives the whole story. May 31, 2019 at 21:39
1

Try to re-create (or re-print) the PDF file using PDFCreator.

1

These didn't work for me, however, using Tool > Protection > Remove Hidden Information and selecting the item with Javascript to remove did work.

1

The easiest way to solve this is to simply print the file to another PDF file, and name it something slightly different than the original. That will remove the printing prompt from automatically opening.

1

Hi a very simple method will be to just open the pdf file with Notepad or Notepad++ & then just find & Comment this line

/JS (this.print\({bUI:true,bSilent:false,bShrinkToFit:true}\);)

like this

//JS (this.print\({bUI:true,bSilent:false,bShrinkToFit:true}\);)

then just save the document & you are Done, Enjoy your PDF like you Want it.

0

Open the Document Properties in Adobe Acrobat (Ctrl+D) and make sure that no toolbars or window controls are hidden in the tab Initial View.

0

With a PDF this same problem had been happening to for me, I was able to make the necessary alterations without Acrobat. I opened the the PDF in a text editor. As noted by Kazark there was a line with "this.print()". I simply deleted the line, and that fixed the problem.

0

If you have Adobe Acrobat Pro here is the solution tested under XI version.

  1. Open the target document and cancel Print dialog

  2. Go to Tools => JavaScript => Set Document Actions => Edit All

  3. Search for this line: this.print({bUI:true,bSilent:false,bShrinkToFit:true});

  4. Comment the line: //this.print({bUI:true,bSilent:false,bShrinkToFit:true});

  5. Click OK, click OK again, save the document. Voila!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.