<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0">
<channel><title><![CDATA[ActionScript.org Flash, Flex and ActionScript Resources - Comments for article: The PrintJob class]]></title><link>http://www.actionscript.org/resources</link><description /><language>en-us</language><copyright><![CDATA[http://www.actionscript.org/resources]]></copyright><generator>N/A</generator><webMaster>general.redirect@gmail.com</webMaster><lastBuildDate>Mon, 23 Nov 2009 00:51:39 CST</lastBuildDate><ttl>20</ttl><item><title><![CDATA[Comment #1]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment764</link><description><![CDATA[A free alternative to Acrobat Distiller is PrimoPDF http://www.primopdf.com/

Keep on saving those trees!<br/><br/>
(Comment posted by Chris Eaton at 6:26 am, Wed 21st Feb 2007)]]></description><author>no@spam.com (Chris Eaton)</author><pubDate><![CDATA[Wed, 21 Feb 2007 06:26:08 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment764</guid></item><item><title><![CDATA[Comment #2]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment1702</link><description><![CDATA[In the "typical script" example there's a typo on this line:
j.addPage (0, {xMin : 0, xMax: 400: yMin: 0, yMax: 400});

It should be a "," after "xMax: 400".<br/><br/>
(Comment posted by Shawn Wilson at 10:46 am, Fri 23rd Mar 2007)]]></description><author>no@spam.com (Shawn Wilson)</author><pubDate><![CDATA[Fri, 23 Mar 2007 10:46:42 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment1702</guid></item><item><title><![CDATA[Comment #3]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment3636</link><description><![CDATA[Great tutorial.

It would be great to see how to implement the pageHeight (etc) properties...
<br/><br/>
(Comment posted by Justin at 8:12 pm, Thu 31st May 2007)]]></description><author>no@spam.com (Justin)</author><pubDate><![CDATA[Thu, 31 May 2007 20:12:54 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment3636</guid></item><item><title><![CDATA[Comment #4]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment8874</link><description><![CDATA[i tested the code in action script 3 but an error occurred: 
"1189: Attempt to delete the fixed property pj.  Only dynamically defined properties can be deleted."  
i delete the line "delete pj" after that the flash worked but when click button to print; every thing work fine but nothing will be printed.<br/><br/>
(Comment posted by makshci at 1:22 pm, Tue 15th Jan 2008)]]></description><author>no@spam.com (makshci)</author><pubDate><![CDATA[Tue, 15 Jan 2008 13:22:08 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment8874</guid></item><item><title><![CDATA[Comment #5]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment12407</link><description><![CDATA[There is ann issue with thePrintJob class when trying to print multiple pages or large Movieclips. The Printjob times out after (default) 15 seconds. 

According to Flash's documentation:

For the given print job instance, if any of the following intervals last more than 15 seconds the next call to PrintJob.start() will return false:
-PrintJob.start() and the first PrintJob.addPage() 
-One PrintJob.addPage() and the next PrintJob.addPage() 
-The last PrintJob.addPage() and PrintJob.send() 

But it's a little more complicated than that. Let's say i want to print 40 sprites containing externally loaded images.  I load the images and prepare the "pages" to print before i start the printjob. Then i use PrintJob.start() and add the pages (40 of them in a loop) via PrintJob.addPage(), and then PrintJob.send().

Each call to PrintJob.addPage() takes a few seconds to complete. This results in flash a Runtime Error #1502 (Timeout by default 15 seconds) and breaks the operation. 

I haven't found any way to get around this except for increasing the timeout-limit in publish settings. As i would need to set the limit to around 600 seconds, that doesn't seem like a good way to solve the problem.

If anyone has a solution or workaround, please let me know...<br/><br/>
(Comment posted by Mikael Nilsson at 6:59 am, Fri 12th Dec 2008)]]></description><author>no@spam.com (Mikael Nilsson)</author><pubDate><![CDATA[Fri, 12 Dec 2008 06:59:14 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment12407</guid></item><item><title><![CDATA[Comment #6]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment12433</link><description><![CDATA[Found this in the adobe "list of bugs not to be fixed anytime soon" (er I mean documentation):

http://livedocs.adobe.com/flex/201/html/20_Printing_177_2.html<br/><br/>
(Comment posted by Simon at 7:42 pm, Fri 19th Dec 2008)]]></description><author>no@spam.com (Simon)</author><pubDate><![CDATA[Fri, 19 Dec 2008 19:42:00 CST]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment12433</guid></item><item><title><![CDATA[Comment #7]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment13136</link><description><![CDATA[Besides the timeout error, I seem to be having a problem with printing that I can find no reference to anywhere.
It has to do with printing as bitmap vs printing vectors. If I have a timeline animation that has filters on it, those filters don't show up in the print out. They are just completely missing. Alpha channels it does fine, transparencies and blend modes... but not the filter effects.
Does anyone know how to get these to appear in the print?<br/><br/>
(Comment posted by aldorr at 2:33 pm, Wed 17th Jun 2009)]]></description><author>no@spam.com (aldorr)</author><pubDate><![CDATA[Wed, 17 Jun 2009 14:33:59 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment13136</guid></item><item><title><![CDATA[Comment #8]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment13185</link><description><![CDATA[good post, help me a lot, adobe suck
for the case to fit to the paper
we can do like this
my_pj = new PrintJob();
	if(my_pj.start()){

	var x =yourMC._width;
    var y = yourMC._height;
	var r = y/x;
	var pagerWidth = my_pj.paperWidth-15 // 15 is the margin total from left and right
	 yourMC._width = pagerWidth;
        yourMC._height = pagerWidth * r;
	

	my_pj.addPage(yourMC, null, {printAsBitmap:true});
	yourMC._width =x;
      yourMC._height = y;
	my_pj.send(); 
	}
	
	delete my_pj;

of course you can do some case selection before calculate the page size
such to detect the paper type by PrintJob.orientation, it will return landscape or portrait, try to use the detection to change your calculation<br/><br/>
(Comment posted by yuen at 3:44 am, Thu 2nd Jul 2009)]]></description><author>no@spam.com (yuen)</author><pubDate><![CDATA[Thu, 02 Jul 2009 03:44:25 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment13185</guid></item><item><title><![CDATA[Comment #9]]></title><link>http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment13290</link><description><![CDATA[Hi

while printing non viewable area coming as black (some part of mc is hided by another object its coming balck)

how to resolve this..<br/><br/>
(Comment posted by kumar at 7:32 am, Tue 28th Jul 2009)]]></description><author>no@spam.com (kumar)</author><pubDate><![CDATA[Tue, 28 Jul 2009 07:32:04 CDT]]></pubDate><guid isPermaLink="true">http://www.actionscript.org/resources/articles/206/1/The-PrintJob-class/Page1.html#Comment13290</guid></item></channel></rss>