4 Replies Latest reply on Apr 29, 2006 9:12 AM by Newsgroup_User

    Printjob -- orientation property

    magus_mike
      Trying to cause a page to print "landscape". Print job is sent to printer and prints OK, just ignores my setting of the orientation. My code is attached.

      Any help is greatly appreciated.

      -mike

        • 1. Re: Printjob -- orientation property
          magus_mike Level 1
          My bad--the property is "read-only". Still, is there any way to change print orientation?
          • 2. Re: Printjob -- orientation property
            Level 7
            magus_mike,

            > My bad--the property is "read-only".

            You betcha.

            > Still, is there any way to change print orientation?

            You betcha, again. Rotate the clip before invoking PrintJob.addPage(),
            then rotate it back aftwards.


            David
            stiller (at) quip (dot) net
            Dev essays: http://www.quip.net/blog/
            "Luck is the residue of good design."


            • 3. Re: Printjob -- orientation property
              magus_mike Level 1
              David,

              Thanks for the advice. Instead of rotating (which loses text), I created a bitmap of the screen and put it in frame 2 of the clip, and used the following code which for some reason prints a blank page. I don't know why I am having so much trouble with this, but if you have a suggestion, I am all ears. -mike

              function doPrint(){
              // create PrintJob object
              var my_pj rintJob = new PrintJob();
              if (my_pj.start()) {
              var pageAdded:Boolean = false;
              if(my_pj.orientation == "portrait"){
              pageAdded = my_pj.addPage("targetMC",null,null,2);
              }else{
              pageAdded = my_pj.addPage("targetMC");
              }

              // send pages from the spooler to the printer
              if (pageAdded) {
              my_pj.send();
              }
              }
              // clean up
              delete my_pj;
              // delete object
              }
              • 4. Re: Printjob -- orientation property
                Level 7
                magus_mike,

                > Thanks for the advice. Instead of rotating (which loses text),
                > I created a bitmap of the screen and put it in frame 2 of the
                > clip, and used the following code which for some reason
                > prints a blank page.

                You have to embed font outlines if you want to rotate text at all. I
                should have mentioned that, sorry. You certainly don't need to add a
                sizable bitmap to your SWF.

                As for printing bitmaps ... I'm not *certain*, but you may have to use
                the printAsBitmap parameter for that.


                David
                stiller (at) quip (dot) net
                Dev essays: http://www.quip.net/blog/
                "Luck is the residue of good design."