apache-flex - FireFox3 中如何打印Flex 组件?

标签 apache-flex actionscript-3 firefox

由于 FireFox 对 ActiveX 组件的错误实现(在打印时确实应该拍摄它们的图像),Flex 组件(在我们的案例图表中)不会在 FX 中打印。

它们在 IE7,甚至 IE6 中打印得很好。

我们需要打印这些图表,但它们也有动态内容。我真的不想在用户打印时将它们再次绘制为图像 - Flex 组件应该这样做。

我们找到了一个 potential workaround ,但不幸的是它在 FireFox3 中不起作用(在 FireFox2 中它有点工作,但还不够好)。

有人知道解决方法吗?

最佳答案

使用 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);
}

关于apache-flex - FireFox3 中如何打印Flex 组件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9256/

相关文章:

http - 为什么 HTTP 不支持 Brotli?

apache-flex - 我可以在没有 Flex builder 的情况下使用 flex 吗?

apache-flex - Mylyn 3.x 的 Subclipse 集成(可选)(3.0.0) 需要插件 "org.eclipse.mylyn.tasks.core (3.0.0)"或兼容插件

java - 在已经使用 spring-mvc 作为依赖项的依赖项的应用程序中设置 spring-mvc

php - 对 JSON、PHP、AS3 不知所措 : Cannot trace correct value

flash - 多个音频到netStream?

java - ColdFusion 启用 RMI over SSL 以解决数据管理问题

javascript - Animate/EaselJS - removeEventListener 不起作用

firefox - 如何在 Firefox DevTools 的 Network 面板中过滤多个域?

html - Div 的外观不同(Firefox 与 Internet Explorer)