Solved

Detect Virtual Printer

Posted on 2008-10-13
2
529 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

696 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