views:

15

answers:

1

Hello all,

I have a large Group which contains two rulers and labels for distances, and a varied amount of smaller groups consisting of images and labels. Now my task is to print the large group on a page with a header and a footer. The large group extends outside the edge of the page and pushes the footer off the page. If I was printing just the Group, I could use

printJob.addObject(myView, FlexPrintJobScaleType.SHOW_ALL); 

to fit it all on one page, but that would scale the header and footer as well, which I don't want - I'll be printing more pages and want the header and footer sizes to stay the same.

Is there a way to scale only the group and its contents automatically before printing?

+2  A: 

arkward... you'd probably have to scale the group before adding it to your print job, which means you are doing to have to do lots of calculations about resolutions, DPIs, etc

The property to change is http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/mx/core/UIComponent.html#scaleY

but working out what to scale by is a much harder job.

Gregor Kiddie
Thanks! Yeah, hadn't considered that it might turn out differently for different resolutions. Might have to give up on that and just print my group for that page, skipping the header and footer. Or adding the header and footer to the group, perhaps, but then they'd be scaled down as well...conundrums, conundrums.
Lizzan
Actually, this worked out really well! When printing in Flex you use a FlexPrintJob, and once the user has confirmed he/she wants to print that print job has the available width and height of the page (in pixels). So, the calculations turned out to be quite easy! Thanks again for steering me in the right direction!
Lizzan