3 Replies Latest reply on Jun 1, 2009 3:46 PM by gkaiseril

    Printing one file to multiple printers

    EmperorsDryCleaner Level 1

      I think this is the right section.  If not, please forgive me.

       

      I'm trying to make, if possible a button on the toolbar that will print two copies to one printer, and one copy to another printer. 

       

      Is that even possible?

       

      Thanks.

        • 1. Re: Printing one file to multiple printers
          gkaiseril MVP & Adobe Community Professional

          Yes, you need to use the "PrintParams" object to identify the printer name and number of copies to print.

          1 person found this helpful
          • 2. Re: Printing one file to multiple printers
            EmperorsDryCleaner Level 1

            Thanks!

             

            I started reading about "PrintParams", and I quickly discovered that I am a bit lost as to exactly how to use it, and how to make a toolbar button to do it.

             

            Is there, anywhere, a graphical walk-through of how to make a toolbar button, and then attach some javascript to it?  Everything I have read so far seems to assume I already know quite a bit more about programming for Acrobat than I do.

             

            Cheers!

            • 3. Re: Printing one file to multiple printers
              gkaiseril MVP & Adobe Community Professional

              First, I would work on creating a 'print' button.

               

              You need to know the printer names assigned on your system. The following code can be run in the JavaScirpt console and display a list of printer names:

               

              var l = app.printerNames.length

              for ( var i = 0; i < l; i++)

              console.println("(" + (i+1) + ") " + app.printerNames[i]);

               

              With that one can then set the printer parameters for the print command:

               

              var myParams = this.getPrintParams();
                myParams.NumCopies = 2;
                myParams.interactive = silent;

                myParams.printerName = "system printer name 1";

               

                this.print(myParams);

               

              var myParams = this.getPrintParams();
                myParams.NumCopies = 1;
                myParams.interactive = silent;

                myParams.printerName = "system printer name 2";

               

               

               

                this.print(myParams);


              This will work from the console, but inorder to use the silent parameter, you will need to create a menu item to get around the priviledged and trusted funcitons.