【问题标题】:pdfjs_rails: Fullscreen/PresentationMode not availablepdfjs_rails:全屏/演示模式不可用
【发布时间】:2016-06-24 13:25:27
【问题描述】:

我正在为我的应用程序使用 pdfjs_rails gem (https://github.com/shyammohankanojia/pdfjs_rails)

问题是,我看不到“演示模式”按钮。
我需要能够全屏查看文件。
我像这样渲染我的 pdf 查看器:

%iframe{ frameborder: "0", height: "500", scrolling: "no", src: "/pdfjs/web/viewer.html?file=#{file}", style: "border: 0", width: "100%" }

谢谢

编辑
根据@CodeMaker 的回答,我使用了:

%iframe{ frameborder: "0", height: "500", scrolling: "no", src: "/pdfjs/web/viewer.html?file=#{file}", style: "border: 0", width: "100%", webkitallowfullscreen: "", mozallowfullscreen: "", allowfullscreen: "" }

【问题讨论】:

    标签: ruby-on-rails pdf rubygems pdf.js


    【解决方案1】:

    对于 pdf_rails 使用这个

    %iframe{ frameborder: "0", height: "500", scrolling: "no", src: "/pdfjs/web/viewer.html?file=#{file}", style="width: 100%; height: 1100px; display:inline-block "  scrolling="yes" webkitallowfullscreen mozallowfullscreen allowfullscreen frameborder="no" }
    

    【讨论】:

    • 我在使用这个时收到一个很长的错误(可能缺少一些逗号等)?webkitallowfullscreen 应该是 div 的一个类吗?
    • 我知道了,我用过:%iframe{ frameborder: "0", height: "500", scrolling: "no", src: "/pdfjs/web/viewer.html?file=#{file}", style: "border: 0", width: "100%", webkitallowfullscreen: "", mozallowfullscreen: "", allowfullscreen: "" }
    猜你喜欢
    • 2016-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-01
    相关资源
    最近更新 更多