3 Replies Latest reply on Sep 3, 2009 5:44 PM by Scott Boepple

    PrintJob creates blurry text


      Hello all,


      I have a flash movie with a print button that uses PrintJob. It's only one page, and I'm printing the root (I need to print the whole screen).

      The size of the stage is 1300 x 850 pixels and needs to be sized down when printing. I found an amazing function created by Steven Sacks that forces the PrintJob class to print in landscape mode - so less resizing is done.

      Now, all of my images are transparent as there are different layers in my movie with images that need to lay on top of eachother. When I set printAsBitmap=true, the text comes out blurry - basically unreadable. When printAsBitmap is set to false, the text comes out perfectly, but of course the images are not correct and have a black background, etc.

      Does anyone have any ideas on how to keep the legibilty of the text while printing as a bitmap?



      I'm using AS2 and Flash CS3.

        • 1. Re: PrintJob creates blurry text

          Hmm - I guess you could try not embedding characters in the fonts so that windows deals with them rather than flash. If that doesn't work, you could force the application to use device fonts only and see if that works.

          The thing is, if flash is exporting it all as a bmp to the printer then it won't be treated as text and just an image.

          • 2. Re: PrintJob creates blurry text
            digamel Level 1

            Thanks for the reply.


            I am not embedding any fonts in the file, I'm just using plain Arial 12 pt font. I tried using the device font _sans, but when I print - it doesn't show up at all.

            Any suggestions?

            • 3. Re: PrintJob creates blurry text
              Scott Boepple

              I ran into the same issue. Device fonts just don't seem to print so I used html formatting to double the size of the text, then took a BitmapData snapshot of it, scaled the snapshot back down to the original size, placed it where the original text was and then print it. Sheesh.



              var printable : Sprite = new Sprite ();



              printPage.tf.htmlText = "<font size='40'>" + printPage.tf.text + "</font>";



              var bd : BitmapData = new BitmapData ( printPage.tf.width, printPage.tf.height, true, 0x00FFFFFF );

              bd.draw ( printPage.tf, null, null, null, null, true );

              var bmp : Bitmap = new Bitmap ( bd, "never", true );



              printPage.tf.htmlText = "<font size='20'>" + printPage.tf.text + "</font>";


              printPage.tf.x = wherever you want it;

              printPage.tf.y = wherever you want it;



              printPage.addChild ( printable );

              printable.addChild ( bmp );



              printable.width = printPage.tf.width;

              printable.height = printPage.tf.height;

              printable.x = wherever you want it

              printable.y = wherever you want it



              var pj:PrintJob = new PrintJob ();

              var rect : Rectangle = new Rectangle ( 30, -10, 792, 612 );

              var options : PrintJobOptions = new PrintJobOptions ();

              options.printAsBitmap = true;


              pj.addPage ( printPage, rect, options );

              pj.send ();



              If anybody knows a way to print device font text without a crazy hack like this please let me know.