1 Reply Latest reply on Aug 14, 2006 8:40 AM by Newsgroup_User

    PrintJob function help urgently required please....

    Level 7
      hey,

      i tested my code below on Friday and everything worked a treat!
      Now it isn't working this morning.....
      I have rebooted this machine and the printer 3 times so far and still it
      will not enter the "myPJ.start() method!!!! .... arrrggghhh....
      Anyone any idea's??

      Thank you
      ----------------------------------------
      var printMC = _root.greetingCard;

      _root.printBtn.onRelease = function() {
      var myPJ:PrintJob = new PrintJob();
      if (myPJ.start()) {
      trace("printing ... ");
      trace("pj.start(): "+true);

      var pagesToPrint = 0;

      if (myPJ.addPage(""+_root.greetingCard, {xMin:-390, xMax:720,
      yMin:-20, yMax:440} )) {
      pagesToPrint++;
      }

      trace("pagesToPrint: "+pagesToPrint);

      if (pagesToPrint > 0) {
      myPJ.send(); // print page(s)
      }
      } else {
      trace("pj.start(): "+false);
      }
      // clean up
      delete myPJ; // delete object
      }


        • 1. Re: PrintJob function help urgently required please....
          Level 7
          please disregard ....

          ended up using the 'print' fuction instead of the 'printJob'
          though if you really desire, and you have an idea why the function all of a
          sudden did/does not work, i'd appeciate the knowledge for future projects.


          "russell" <russell@_NOspam_webruss.com> wrote in message
          news:ebq37t$nfa$1@forums.macromedia.com...
          > hey,
          >
          > i tested my code below on Friday and everything worked a treat!
          > Now it isn't working this morning.....
          > I have rebooted this machine and the printer 3 times so far and still it
          > will not enter the "myPJ.start() method!!!! .... arrrggghhh....
          > Anyone any idea's??
          >
          > Thank you
          > ----------------------------------------
          > var printMC = _root.greetingCard;
          >
          > _root.printBtn.onRelease = function() {
          > var myPJ:PrintJob = new PrintJob();
          > if (myPJ.start()) {
          > trace("printing ... ");
          > trace("pj.start(): "+true);
          >
          > var pagesToPrint = 0;
          >
          > if (myPJ.addPage(""+_root.greetingCard, {xMin:-390, xMax:720,
          > yMin:-20, yMax:440} )) {
          > pagesToPrint++;
          > }
          >
          > trace("pagesToPrint: "+pagesToPrint);
          >
          > if (pagesToPrint > 0) {
          > myPJ.send(); // print page(s)
          > }
          > } else {
          > trace("pj.start(): "+false);
          > }
          > // clean up
          > delete myPJ; // delete object
          > }
          >
          >