6 Replies Latest reply on Jul 24, 2014 7:03 AM by George_Johnson

    FireFox runs 'this.print()' automatically regardless of position in code?

    MarkWalsh Level 4

      FireFox seems to automatically print a PDF if the 'this.print()' line appears anywhere in the code, even if it is in an uncalled function, and even if it  commented out. Example, if you create a document with only the following code:

       

      function UncalledFunction(){

      /*

      if (false) {

        // this.print()

        }

      */

      }

       

      When you open it in FireFox, the print dialog will automatically show up, despite the fact that the function is not called anywhere, the code within the function is enclosed in a block comment, a false condition, and is also line commented out.

       

      Is there any way to include the print functionality in a script without it being automatically run?