9/19/2010 7:55:39 AM
Title:
Printing to local printers with Air
We have an internet application (PHP) that needs to print to a local printer. Would this be easier to do with an Air application running on the local machine?
9/19/2010 10:12:20 AM
if you are printing a complete HTML page then there is no such difference in printing in HTML/JavaScript or flex. Flex just provides you additional benefit to print any particular area or text in case we don't want to print a complete page. In JavaScript if you want to print a particular part of page then you need to open that content in a popUp window and then print it.
9/19/2010 10:58:43 AM
We only printing to a label,nothing on the HTML page.
9/19/2010 11:16:34 AM
if your page is just the text you want to print then you can simply palace a print button with the below javascript code or automatically trigger print, I don,t see any need for Adobe AIR. You can simply call the print function on onLoad Event of your php page. As soon as your page loads it will automatically trigger for printing, I think this is simple enough.
<body onload="javascript:window.print()">
</body>
9/19/2010 11:39:53 AM
The page does not contain the text that goes on the ticket(label). The application prints tickets to ticket printer machine from records stored in MySQL tables.
9/19/2010 10:17:45 PM
Hi Gary , look at my following thread I have already answered such similar question. I have given code there to implement printing in Adobe AIR or Flex. See the accepted answers
http://askmeflash.com/qdetail/881/how-to-print-in-air-flex