Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem with PrintJob and default background

New Here ,
Aug 11, 2015 Aug 11, 2015

Hello, I have problem with PrintJob - printing to pdf.

I want print some bitmaps with transparency and vectors.

I checked all options and still have grey background under bitmaps and vectors. This is stage background color.

It seems to me that flash is printing in bitmap mode whatever I do.
Anybody know how print MovieClip/Bitmap without default background. I send to print bitmap/movieclip with transparency but on output is still filled bitmap.

var pj:PrintJob = new PrintJob();

var sheets:MovieClip;// = new Sprite();

var options:PrintJobOptions = new PrintJobOptions();

options.printAsBitmap = false;

var dodd:MovieClip = new MovieClip();

stage.addChild(dodd);

var pagesToPrint:uint = 0;

if (pj.start()) {

    for (var i:int = 0; i < pages.length; i++)

    {

        sheets = new MovieClip();

        //sheets.graphics.beginFill(0xFF0000, 0);

        //sheets.graphics.beginBitmapFill(pages.getChildAt(0).bitmapData, null, false, true);

        /*sheets.graphics.lineStyle(0,0,0);

        sheets.graphics.drawRect(0, 0, pj.pageWidth, pj.pageHeight);

        sheets.graphics.endFill();*/

        sheets.addChild(pages);

        dodd.addChild(sheets);

        try {

            pj.addPage(sheets, new Rectangle(0, 0, pj.pageWidth, pj.pageHeight) , options);

            pagesToPrint++;

        }

        catch(e:Error) {

            // do nothing

        }

    }

    if(pagesToPrint > 0) {

        pj.send();

    }

  

    while(dodd.numChildren>0){

        dodd.removeChildAt(0);

    }

    stage.removeChild(dodd);

    dodd = null;

  

}

TOPICS
ActionScript
289
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 11, 2015 Aug 11, 2015

using actionscript, create new 'pages' with a white background and the content you want and then print those new pages.

Translate
Community Expert ,
Aug 11, 2015 Aug 11, 2015
LATEST

using actionscript, create new 'pages' with a white background and the content you want and then print those new pages.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines