Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Detect Virtual Printer

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

thanks very much
0
xuzhaogang
Asked:
xuzhaogang
1 Solution
 
CyanBlueCommented:
Flash won't be able to detect the printer attached to the system virtually or not...  Flash only invokes the print function, and the rest depends on the browser...

CyanBlue
0
 
nightmare3dCommented:
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

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now