【问题标题】:Reveal.js and plotly - exporting to pdf?Reveal.js 和 plotly - 导出为 pdf?
【发布时间】:2020-05-27 12:25:56
【问题描述】:

我正在使用显示 js 来显示一些使用 iframe 本地托管的 plotly 图表。

除了导出为 pdf 的能力之外,这很好用。当我转到http://localhost:138/presentations/pres1/?print-pdf (as described here) 时,我可以导出文本,但不会出现绘图图表。我认为这是由于 plotly 库未加载。

有没有办法加载本地的html文件,以便导出为pdf?

我在幻灯片中使用了以下内容:

#### Slide with iframe

<iframe data-src="http://localhost:138/html/localpage.html" width="900" height="500" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:0px solid #666; margin-bottom:5px; max-width: 600%;" allowfullscreen=true></iframe>

我正在保存 plotly 图表using export interactive html

【问题讨论】:

    标签: plotly reveal.js


    【解决方案1】:

    也许对你来说为时已晚,但我仍然会为以后遇到相同问题的搜索者回答:-)

    这是由于 iframe 的延迟加载造成的。当您将 data-preload 属性设置为 iframe 时,它​​应该出现在打​​印版本中。

    我在这里描述了我的问题,也许我们也可以添加一个自动化的解决方案: https://github.com/hakimel/reveal.js/issues/2795#issue-714101762

    【讨论】:

    • 能否详细说明如何设置 data-preload 属性?谢谢!
    • @SaaruLindestøkke 像这样:&lt;iframe data-src="https://hakim.se" data-preload&gt;&lt;/iframe&gt;revealjs.com/media/#lazy-loading-iframes 中所述
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-30
    • 1970-01-01
    • 2019-03-08
    • 2021-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多