Paren Mwelase
Paren Mwelase

Reputation: 25

Printing dynamic components using AS3 PrintJob

I am trying to print dynamically created spark components using PrintJob (not FlexPrintJob). The problem is it prints blank when I pass the component to PrintJob e.g.:

printJob.addPage(component as Sprite, null, pjo); - component is dynamically created. printJob.send();

How can I make the component and its contents available?

Any and every response will be really appreciated. Thanks.

Upvotes: 0

Views: 198

Answers (2)

Paren Mwelase
Paren Mwelase

Reputation: 25

your help is appreciated. I've found a solution (although its not what I wanted). What I did is I generated my component using Sprite and TextField and then I printed it using PrintJob not FlexPrintJob

Upvotes: 1

StephenNYC
StephenNYC

Reputation: 1264

paren, convert your components into a bitmapdata, create an invisible bitmap that is added to canvas, attach the bitmapdata into it, draw the bitmapdata into a new sprite and pass that into your printjob. thats how I got it working on my own proj.

Upvotes: 0

Related Questions