2008-08-12 102 views
5

感謝FireFox ActiveX組件的實現(它確實應該在打印時拍攝它們的圖像)Flex組件(在我們的示例圖中)不能在FX中打印。如何在FireFox3中打印Flex組件?

它們在IE7中甚至IE6中都能正常打印。

我們需要這些圖表來打印,但他們也有動態內容。當用戶打印時,我不想再將它們作爲圖像繪製 - Flex組件應該這樣做。

我們發現了一個potential workaround,但不幸的是它在FireFox3中無法正常工作(在FireFox2中它可以工作,但不夠好)。

任何人都知道一個解決方法嗎?

回答

3

使用ACPrintManager我能夠得到完美的firefox 3打印!

我不得不添加到示例中的一件事是檢查stage是否爲null,如果stage爲null,則callLater。

private function initPrint():void { 
    //if we don't have a stage, wait until the next frame and try again 
    if (stage == null) { 
     callLater(initPrint); 
     return; 
    } 

    PrintManager.init(stage); 

    var data:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight); 
    data.draw(myDataGrid); 

    PrintManager.setPrintableContent(data); 
} 
0

謝謝。一個callLater加載到我們的自定義圖表代碼的負載似乎已經做到了。