Skip to main content
Participant
April 28, 2006
Question

Printjob -- orientation property

  • April 28, 2006
  • 4 replies
  • 406 views
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

This topic has been closed for replies.

4 replies

Inspiring
April 29, 2006
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."


Participant
April 28, 2006
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
}
Inspiring
April 28, 2006
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."


Participant
April 28, 2006
My bad--the property is "read-only". Still, is there any way to change print orientation?