# Print Multiple Pages

**URL:** https://forum.kirupa.com/t/print-multiple-pages/268952
**Category:** flash
**Created:** [August 20, 2008, 8:14pm UTC](https://forum.kirupa.com/t/print-multiple-pages/268952 "2008-08-20T20:14:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wyktor](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wyktor](https://forum.kirupa.com/u/wyktor)
#### Post date: [August 20, 2008, 8:14pm UTC](https://forum.kirupa.com/t/print-multiple-pages/268952/1 "2008-08-20T20:14:02Z")

</div>

Hi,

I’m building a application where user creates pages with content and I’d like to give them option to print these pages. My pages are MovieClips that are inside another MovieClip. I’d like to iterate through all pages and add them to print job. I tried to use addPage() method of PrintJob class, but I don’t know how to iterate through these MovieClips. I tried for loop but I came to Implicit coertion error.

```auto
 
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint = 0;
if (pj.start())
{
for (var f:Number = 0; f < stb.length; f++) {
var chld:MovieClip = layout.getChildAt(f); // this throws me an implicit coertion error
try
{
pj.addPage(chld);
pagesToPrint++;
}
catch (error:Error)
{
// Respond to error.
}
}
trace("sending to printer")
pj.send();
}

```

Thanks for your help.
