• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • 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

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

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