Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 497

Programming actionscript 3.0
Table of Contents

Advertisement

{
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint = 0;
if (pj.start())
{
if (pj.orientation == PrintJobOrientation.LANDSCAPE)
{
throw new Error("Page is not set to an orientation of
portrait.");
}
sheet1.height = pj.pageHeight;
sheet1.width = pj.pageWidth;
sheet2.height = pj.pageHeight;
sheet2.width = pj.pageWidth;
try
{
pj.addPage(sheet1);
pagesToPrint++;
}
catch (e:Error)
{
// Respond to error.
}
try
{
pj.addPage(sheet2);
pagesToPrint++;
}
catch (e:Error)
{
// Respond to error.
}
if (pagesToPrint > 0)
{
pj.send();
}
}
}
}
}
Example: Multiple-page printing
497

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents