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
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;
};