views:

3162

answers:

2

I've been trying to figure out how to print in Adobe AIR. I know the standard javascript functions don't work. The AIRforJSDev guide says: "The window.print() method is not supported within Adobe AIR 1.0. There are other methods available via the exposed AIRAPIs that give you access to printing within the runtime"

But I can't find those functions. I've looked in the language reference but can't find them there anywhere. Where are they and what are they ?

+1  A: 

What you need to do is access the AS3 flash.printing.PrintJob API. Here's a page on accessing flash API from javascript (basically you just do window.runtime.XYZ where XYZ is the flash API).

You should look up tutorials on printing in flash, just need minor tweaks to do it from JS. Here's two random tutorials on printing in flash I found: one, two

davr
A: 

If you're talking about just printing out to the console then you'll want the trace() method.

This can be accessed using air.trace() from within javascript assuming you have the AIRAliases.js file included.

ghickman

related questions