7 Replies Latest reply on May 17, 2010 11:16 PM by dbaragan

    Serious Problem with Adobe Air printing - Html-AJAX developer

    Hidden Pearls

      hi Guys,


      It is my first commercial project and I am really disappointed with adobe air so far.

      I have played a lot with adobe air to work with Print functionality but damn all is vain.


      I need a big HELP from community and this is my final hope. If not I will leave Development in Adobe Air.


      I am working on adobe air HTML-Ajax application. What it does, gets the order details from server and then print the order details.


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
              <meta name="generator" content=
              "HTML Tidy, see www.w3.org" />
              <title>Pizza Smart Order Prints</title>
              <link href="sample.css" rel="stylesheet" type="text/css"/>
              <script type="text/javascript" src="lib/air/AIRAliases.js"></script>
               <script type="text/javascript" src="lib/jquery/jquery-1.3.2.min.js"></script>
              <script type="text/javascript">
                  function doPrintAir()
                         var pjob = new window.runtime.flash.printing.PrintJob;
         if ( pjob.start() )
                          var poptions = new window.runtime.flash.printing.PrintJobOptions;
                          poptions.printAsBitmap = true;
                              pjob.addPage(window.htmlLoader, null, poptions);
                              //alert("PrintJob start");
                          catch (err)
                              alert("exception: " + err);
                         // alert("PrintJob couldn't start");
              <script language=javascript>
      var t=0;
      var timer;
      function clock()
                           // goes and check for the orders posted
                                 type: "POST",
                                 url: "http://xxxxxxxxxxxxxxr/air/db.php",
                                 data: "id=;908fHtiIl",
                                 success: function(msg){
                                   // alert( $('#main_window').html() );
                                   if (msg == "nothing") {
                                   else if(msg !=""){
              <table width="200" border="1">
          <td><span class="style1">Pizza Application</span></td>
              <div id="main_window">
              <div id="board"></div>



      Is there any way to just pass the text to print ? instead of html page ?