Yeah, The Flash Player doesn’t allow silent printing, as some wag would write 
an advertising swf which printed out their entire promotional literature of 
2000 pages on your printer every time you checked your email…

Nate is right, if you have JS code that works, call out to that, or use some 
other means of interacting with the printer (we have a client side DotNet 
component to handle our printing needs).

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:       01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk <blocked::http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended solely 
for the addressee. Access, copying or re-use of information in it by anyone 
else is not authorised. Any views or opinions presented are solely those of the 
author and do not necessarily represent those of INPS or any of its affiliates. 
If you are not the intended recipient please contact is.helpd...@inps.co.uk

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Nate Beck
Sent: 29 January 2009 17:18
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Silent Print from Flex on Kiosk

 

Just a theory... but you might be able to use ExternalInterface to call the 
same methods within user.js, and pass the content.  Since you're already got it 
working within Javascript.

 

I wish I knew more about FlexPrintJob.

On Thu, Jan 29, 2009 at 8:41 AM, Jeremi Bergman <jere...@gmail.com 
<mailto:jere...@gmail.com> > wrote:

I have a flex app that I need to print an image. I have Firefox Setup
running the app.

in user.js for FF i have:
user_pref(†print.always_print_silent†,true);
user_pref(†print.show_print_progress†,false);

This works perfectly when using firefox's print functionality on any
standard site. It prints directly to the default printer without any
user interaction.

Within my App I have:

public static function printCoupon(obj:UIComponent):void {
// Create an instance of the FlexPrintJob class.
var printJob:FlexPrintJob = new FlexPrintJob();

// Start the print job.
if (printJob.start() != true) return;

// Add the object to print. Do not scale it.
printJob.addObject(obj, FlexPrintJobScaleType.NONE);

// Send the job to the printer.
printJob.send();
}

The UIComponent passed in is an Image.

It prints the image, but it prompts me with the print diologe box.

Any thoughts? Thanks.




-- 

Cheers,
Nate
----------------------------------------
http://blog.natebeck.net <http://blog.natebeck.net> 



 

Reply via email to