[flexcoders] Re: Silent Print from Flex on Kiosk

2009-02-06 Thread Jeremi Bergman
If anyone else comes across this need, here's how I solved it for my
particular setup.

My Flex app is the client on the Kiosk that connects via RPC back to a
PHP backend.

So when I need to print, I call a service on my backend which
generates a PDF and returns a URL.

Flex then calls a Java Print Server that I wrote that sits and listens
for incoming URLs to print. When it gets one, it prints to the default
printer.

Javascript was just too inconsistent for this.

Thanks all.

--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 I agree, more than anything Adobe could do, being over zealous on the
 security front could inhibit Flash as a platform taking off (yes I'm
 still annoyed about not getting to load remote modules in AIR). It
 wasn't exactly a winner for Vista!
 
 If they can work out a comfortable security model that...
 
 1.Stops drive by swfs owning your machine and,
 2.allows trusted applications to do more with less security,
 
 they will be onto a winner. The Flash Player is maturing into number 1
 nicely, but AIR has still a ways to go to meet number 2.
 
  
 
 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...@...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Jeremi Bergman
 Sent: 30 January 2009 20:51
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Silent Print from Flex on Kiosk
 
  
 
 Thanks for the info.
 
 It would be nice to be able to add an app as a Trusted application,
 so that the application would have the option to print silently.





RE: [flexcoders] Re: Silent Print from Flex on Kiosk

2009-02-02 Thread Gregor Kiddie
I agree, more than anything Adobe could do, being over zealous on the
security front could inhibit Flash as a platform taking off (yes I'm
still annoyed about not getting to load remote modules in AIR). It
wasn't exactly a winner for Vista!

If they can work out a comfortable security model that...

1.  Stops drive by swfs owning your machine and,
2.  allows trusted applications to do more with less security,

they will be onto a winner. The Flash Player is maturing into number 1
nicely, but AIR has still a ways to go to meet number 2.

 

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 Jeremi Bergman
Sent: 30 January 2009 20:51
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Silent Print from Flex on Kiosk

 

Thanks for the info.

It would be nice to be able to add an app as a Trusted application,
so that the application would have the option to print silently.





Re: [flexcoders] Re: Silent Print from Flex on Kiosk

2009-01-31 Thread Igor Costa
As our friend suggest before,

You can communicate with Javascript and pass the job to js and you will
print silence, dispatch the print silent to the js as you wish.

Two interesting sites to read it
http://stackoverflow.com/questions/21908/silent-printing-in-a-web-application
http://www.actionscript.org/forums/archive/index.php3/t-102128.html

Regards
Igor Costa
www.igorcosta.org



On Fri, Jan 30, 2009 at 6:51 PM, Jeremi Bergman jere...@gmail.com wrote:

   Thanks for the info.

 It would be nice to be able to add an app as a Trusted application,
 so that the application would have the option to print silently.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gregor
 Kiddie gkid...@... wrote:
 
  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...@...
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com]
 On Behalf Of Nate Beck
  Sent: 29 January 2009 17:18
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.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...@...
 mailto:jere...@...  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
 

  




-- 

Igor Costa
www.igorcosta.com
www.igorcosta.org


Re: [flexcoders] Re: Silent Print from Flex on Kiosk

2009-01-31 Thread Anatole Tartakovsky
Well, that was really old way to do it in IE5. You can use more reliable way
with our HTMLPrinting.com control we released for IE about 8 years ago (
yep, still works ) - at least you will get templates and control of what and
how you will print - suppression of the dialog is 20% of the task, real
control of the paper size/orientation, margins, trays, duplex,  etc are
really necessary - not to mention printer queue management.
Regards,
Anatole Tartakovsky
Farata Systems

On Sat, Jan 31, 2009 at 10:36 AM, Igor Costa igorco...@gmail.com wrote:

   As our friend suggest before,

 You can communicate with Javascript and pass the job to js and you will
 print silence, dispatch the print silent to the js as you wish.

 Two interesting sites to read it

 http://stackoverflow.com/questions/21908/silent-printing-in-a-web-application
 http://www.actionscript.org/forums/archive/index.php3/t-102128.html

 Regards
 Igor Costa
 www.igorcosta.org




 On Fri, Jan 30, 2009 at 6:51 PM, Jeremi Bergman jere...@gmail.com wrote:

   Thanks for the info.

 It would be nice to be able to add an app as a Trusted application,
 so that the application would have the option to print silently.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gregor
 Kiddie gkid...@... wrote:
 
  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...@...
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com]
 On Behalf Of Nate Beck
  Sent: 29 January 2009 17:18
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.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...@...
 mailto:jere...@...  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
 




 --
 
 Igor Costa
 www.igorcosta.com
 www.igorcosta.org

  



[flexcoders] Re: Silent Print from Flex on Kiosk

2009-01-30 Thread Jeremi Bergman
Thanks for the info.

It would be nice to be able to add an app as a Trusted application,
so that the application would have the option to print silently.



--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 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...@...
 
 
 
 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...@...
mailto:jere...@...  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