Solved

Detect Virtual Printer

Posted on 2008-10-13
2
527 Views
Last Modified: 2013-11-11
hi,
Is it possible to detect if the printer user selected is virtual or physical one?

thanks very much
0
Comment
Question by:xuzhaogang
2 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 125 total points
ID: 22701933
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
 
LVL 1

Expert Comment

by:nightmare3d
ID: 34951716
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question