Link to home
Start Free TrialLog in
Avatar of xuzhaogang
xuzhaogang

asked on

Detect Virtual Printer

hi,
Is it possible to detect if the printer user selected is virtual or physical one?

thanks very much
ASKER CERTIFIED SOLUTION
Avatar of CyanBlue
CyanBlue
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nightmare3d
nightmare3d

yes , flash is detect any printer... but user must select...

the code like this:
import flash.printing.PrintJob;
import flash.display.Sprite;
import flash.printing.PrintJobOptions;


var printer:PrintJob = new PrintJob();
var po:PrintJobOptions = new PrintJobOptions(true);

if ( printer.start() )
{
	var spr:Sprite = new Sprite();
	addChild(spr);
	
	spr.addChild(kutu01);
	spr.addChild(kutu02);
	spr.addChild(kutu03);
	
	if (printer.orientation == "portrait")
	{
		spr.rotation = 90;
	}
	
	printer.addPage(spr,null,po);
	
	printer.send();
	
	
}
else
{
	trace ("there is no printer...");
}

Open in new window