2 Replies Latest reply on Oct 16, 2008 3:37 AM by Prad_K

    Window HTML Printing Issue

    Prad_K
      Hi,

      I'm opening a new window in adobe air, which has a html page that needs to be printed out. The code I use for printing is below.

      function doprint()
      {
      var pjob = new window.runtime.flash.printing.PrintJob;
      if ( pjob.start() )
      {
      var poptions = new window.runtime.flash.printing.PrintJobOptions;
      poptions.printAsBitmap = false;
      try
      {
      pjob.addPage(window.htmlLoader, null, poptions);
      pjob.send();
      }
      catch (err)
      {
      alert("An error occurred when trying to print report");
      }
      }
      else
      {
      alert("Printing of this report was cancelled");
      }
      }

      The issue I seem to have is that the print out is completely anti aliased, so the text seems really blurred that it's hard to read the information when printed. I have set print as bitmap option to false so that it prints in vector, but I still get the same issue. Is there a way of resolving this. I think it may also be down to webkit's anti-aliasing the html before print. Hope some one on the forum can help me with this issue.

      Cheers

      Prad
        • 1. Re: Window HTML Printing Issue
          Azudio
          Hi Prad,

          Sorry this is just the way things are , I trying to do exactly the same thing as you but I get the same results as you and have hot found a workaround yet.

          I find it totally incredible that Adobe of all organisations could ship a product that cannot print properly. If Air wants to become a credible desktop application environment then core functionality such as printing should be available. All other Webkit based apps such as Safari seem to be able to print so I'm not sure what Adobes reasons are for breaking printing so badly, hopefully in the next relase of Air they would have fixed it.

          Adam.
          • 2. Re: Window HTML Printing Issue
            Prad_K Level 1
            Hi Adam,

            Thanks for getting back. I understand what you mean. I find it hard to believe that there's no workaround or a solution to tackle the anti-aliasing. I was hoping some one on this forum would be able to point me in the right direction.

            Prad