The bottom of the page is truncated when printed. (Approx 1/2 to 1").
This printing problem does not seem to be specific to Flash (printing certain PDFs also yields this problem), but that is where we found it.
The problem does not occur in older versions of OS X, but does occur in the most recent versions (10.5.5 and up). Not sure where the line is. The same application on Windows works fine.
It happens in Safari and Firefox.
Our Flash CS3 (AS2) application uses the PrintJob object to send pages to the printer. The pages are supposed to be letter-sized. On Windows they are letter-sized and print fine. But on the Mac, the pages are truncated. When the browser Print dialog comes up, if you change paper size to A4, the document prints fine. IT IS NOT SUPPOSED TO BE A4.
What is going on?
Here is a fraction of our printing code:
private function runPagePrintJob(pages:Array):Void {
var pj:PrintJob = new PrintJob();
if (pj.start()) {
var paperHeight:Number = this.pointsToPixels(pj.pageHeight);
var paperWidth:Number = this.pointsToPixels(pj.pageWidth);
for (var i:Number=0; i<pages.length; i++) {
var mc:PrintablePage = pages[i];
var xScale:Number = paperWidth / mc._width;
var yScale:Number = paperHeight / mc._height;
if ((xScale < 1) || (yScale < 1)) {
mc.setScale(Math.min(xScale, yScale) * 100);
}
mc.setBGSize(paperWidth, paperHeight);
var xMin:Number = 0;
var xMax:Number = paperWidth;
var yMin:Number = 0;
var yMax:Number = paperHeight;
pj.addPage(mc, {xMin:xMin, xMax:xMax, yMin:yMin, yMax:yMax}, {printAsBitmap:true});
}
pj.send();
}
delete pj;
this.close();
}
private function pointsToPixels(pts:Number):Number {
return pts/72*System.capabilities.screenDPI;
}