Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-26-2010, 09:13 AM
Member
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 40
Default Printer.printers example

Hi,

I have a pc with a label printer and a normal A4 printer.

Here is what I want to do:
My tool needs a custom print-settings panel where I can select and store the default printer for printing labels and the default printer for printing A4 pages.
Once the app knows these settings I want to print to labels and A4 pages without having a printer settings screen.

So how can I have a lookup of all printers and how can I print to a selected printer? Printer.printers looks like the method to use, but I can't get it to work. I want to access it from the AS3 SWFKit classes.

thanks!
Reply With Quote
  #2 (permalink)  
Old 05-27-2010, 03:28 PM
Member
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 40
Default

Anybody?
Reply With Quote
  #3 (permalink)  
Old 05-30-2010, 11:03 AM
Member
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 40
Default

Swkkit staff, can I have one quick example on how to use Printer.printers using As3 classes?
Reply With Quote
  #4 (permalink)  
Old 07-02-2010, 01:56 PM
Member
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 40
Default

Ok, after trial 'n error ... I found this solution:

in swfKit, initialize script:
Code:
//called from flex
function swfkitGetPrinterList() {
	//Dialogs.msgBox("Printer.printers.join: "  + Printer.printers.join("<$$>"));
	var s = Printer.printers.join("<$$>");
	return s;
}
in Flex3:
Code:
var g:Global = new Global;
var s:String = g.swfkitGetPrinterList(); 
var printerlist:Array = s.split("<$$>");
However I could not get network printers, only local ones show up
Anybody?
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:12 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.