【问题标题】:Is there a way to export the PowerPoint?有没有办法导出 PowerPoint?
【发布时间】:2017-03-22 05:05:18
【问题描述】:

我想将 GoJs 图表导出到 Microsoft Office PowerPoint。所以检查了它,但我无法得到一个好的结果。

有什么好的方法吗?

【问题讨论】:

    标签: javascript canvas gojs


    【解决方案1】:

    目前支持jpeg图片类型。

    myDiagram.makeImage({
          scale: 1,
          background: "AntiqueWhite",
          type: "image/jpeg"
        });
    

    下图是使用 AntiqueWhite 背景创建的 jpeg。

    更多信息请参考本页documentation

    【讨论】:

      【解决方案2】:

      我找到了最好的方法。

      Gojs 无法导出到 PowerPoint,但我可以获取图表对象。

      使用该对象,编写一个中间 json 文件。

      我们从该 json 中获取图表的状态并使用 apache poi 创建一个 PowerPoint。

      apache poi https://poi.apache.org/

      谢谢。

      【讨论】:

        猜你喜欢
        • 2019-08-02
        • 2020-11-05
        • 2013-03-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-18
        • 2013-05-27
        相关资源
        最近更新 更多