Posted by amory in SWF Studio V3 on Jun 02 2008, 03:50 pm

I'm trying to print using ssCore.Printer.printWindow in landscape.

I'm using Adobe Flash CS3 compiling to a Flash 8 SWF for compatibility with SWFStudio3.5 (build 314) and building that into an executable running on a Windows Vista PC. Using the following code, my app doesn't seem to be able to print in landscape. I've even tried setting the default printer properties in the windows control panel to print in landscape orientation, but it always winds up printing in portrait and cropping off the right side of the screen. Any suggestions?

   x = ssCore.Printer.setProperties({topMargin:"0.5",bottomMargin:"0.5",leftMargin:"0.5",rightMargin:"0.5",paperOrientation:"landscape"});
   x = ssCore.Printer.printWindow({x:"0",y:"0",width:"1024",height:"1280",fitToPage:"true",center:"true"});


Posted by amory in SWF Studio V3 on Jun 02 2008, 04:59 pm

Whoops...I found my mistake. I transposed the height and width. Switches to landscape automatically now, but the print margins leave a lot of unused space. Any suggestions for reducing them? I'd like to maximize the real-estate on the paper.


Posted by northcode in SWF Studio V3 on Jun 02 2008, 10:28 pm

The FitToPage option maintains the aspect ratio of your image so there may be excess white space in one direction if the aspect ratio of your image doesn't match the paper closely enough. Using StretchToFit will ignore the aspect ratio and stretch the image to fill as much of the page as possible (which may not be what you're after).


Posted by amory in SWF Studio V3 on Jun 05 2008, 01:07 pm

Thanks, I'm using FitToPage right now. I think the aspect ratio is one of the things that was different from another older project I had completed: that one filled the page more, but that was because it's print output was designed to fill the printed page completely.

Is there a way to adjust the print margins? I think they're 1" on the sides and 1 3/4" from the top and bottom (in portrait) right now.