# printJob() class nightmare

**URL:** https://forum.kirupa.com/t/printjob-class-nightmare/280464
**Category:** flash
**Created:** [January 27, 2009, 10:34pm UTC](https://forum.kirupa.com/t/printjob-class-nightmare/280464 "2009-01-27T22:34:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![madhat](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@madhat](https://forum.kirupa.com/u/madhat)
#### Post date: [January 27, 2009, 10:34pm UTC](https://forum.kirupa.com/t/printjob-class-nightmare/280464/1 "2009-01-27T22:34:54Z")

</div>

Hi Everyone,  
I’m having a problem with the printJob() object. I’m beginning to think that I’m trying to do something that can’t be done. I would like to know if I’m off-base here, or if there is a solution to my problem.

Here’s what I’m trying to do:  
-I have created a training course that is multiple slides  
-I want to create an automated process for printing out each of the slides to a separate page in a pdf file.

Here’s what I’ve been able to do:

-I setup a print panel on the top of my course with 3 buttons:  
[LIST]  
[_]start print job - printStart\_mc  
[_]add page to job - printAdd\_mc  
[_]send job to printer - printSend\_mc  
[/LIST]So, if I want to print out the pages of the course I:[LIST=1]  
[_]Initialize the print job by pressing the \*\*printStart \*\*button  
[_]Add pages to the print job by pressing the **printAdd** to job button  
[_]Finally, when I want to print the pages, I hit the **printSend** job to printer button.  
[/LIST]…and finally, here is my code to the buttons

```auto
 
printPages = 0;
 
printStart_mc.onRelease = function(){        
  var pj = new PrintJob(); 
  trace("Print Job Started");
};
 
printAdd_mc.onPress = function(){
  _level0._xscale = _level0._yscale = 75; //Scale main timeline to fit page
  pj.addPage (0, {xMin : 0, xMax: 800, yMin: 0, yMax: 600});
  _level0._xscale = _level0._yscale = 100; //Un-scale the main timeline after it's addded to print que
  printPages++;
  trace("Page added to print job");
};
 
printSend_mc.onPress = function(){
  if(printPages > 0){
    pj.send();
    trace("Job sent");
  }else{
   trace("You need to add some pages. Restart the print job");
  }
delete pj;
};

```
