Copy link to clipboard
Copied
Hi Folks,
I have a web application, wherein i am using Printjob class to print my flash content over the connected printer.
While browsing the application on web browser (desktop) it opens a print dailog box which is fine, but same application while browsing from android devices is not working..
I am publishing the content using less than the 10.2 version of the flash player.
any idea??
Thanks in advance.!!
Below is the code:
import flash.printing.PrintJob;import flash.display.Sprite;
import flash.events.MouseEvent;
var myPrintJob:PrintJob = new PrintJob();
var mySprite:Sprite = new Sprite();
mySprite.graphics.beginFill(0x336699);
mySprite.graphics.drawCircle(100, 100, 50);
addChild(mySprite);
function BasicPrintExample()
{
if (myPrintJob.start())
{
try
{
myPrintJob.addPage(mySprite);
}
catch (e:Error)
{
// handle error
}
myPrintJob.send();
}
}
bt.addEventListener(MouseEvent.CLICK, btnClickHandler)
function btnClickHandler(evt)
{
BasicPrintExample()
}
Copy link to clipboard
Copied
from the PrintJob API
Mobile Browser Support: This class is not supported in mobile browsers.
AIR profile support: This feature is supported on all desktop operating systems, but it is not supported on mobile devices or AIR for TV devices. You can test for support at run time using the PrintJob.isSupported
property. See AIR Profile Support for more information regarding API support across multiple profiles.
Copy link to clipboard
Copied
Hi _spoboyle,
Thanks for the information, very helpfull
Do you know any similair API or something used for printing the flash content over mobile devices.
Or any alternative would be appreciated
Thanks,
Dhiru
Copy link to clipboard
Copied
I don't think you are going to be able to print anything directly from and Android AIR app. Although there are applications out there printing I assume they are all native.