【问题标题】:Javascript: Open Two Pdf Adobe Side By Side in Same WindowJavascript:在同一窗口中并排打开两个 Pdf Adob​​e
【发布时间】:2020-11-19 20:28:39
【问题描述】:

在 Javascript 或 Angular 中是否有办法在同一个窗口中并排查看两个 Adob​​e PDF?我手动看到很多资源

尝试在代码中实现,可能使用 window.open 或其他语法

https://community.adobe.com/t5/acrobat-reader/how-do-i-display-two-pdf-documents-side-by-side/td-p/7825917

https://answers.acrobatusers.com/How-view-pdf-separate-pdf-side-side-q144843.aspx

https://www.youtube.com/watch?v=p0qRM5koats

使用 Angular 10 打字稿

【问题讨论】:

    标签: javascript angular typescript pdf adobe


    【解决方案1】:

    我会在多个 iframe 中打开它们。

    <iframe src="path/to/pdf1.pdf"></iframe>
    <iframe src="path/to/pdf2.pdf"></iframe>
    

    使用 window.open

    var win = window.open();
    win.document.write(`<iframe width="${width}" height="${height}" src="path/to/pdf1.pdf" frameborder="0" allowfullscreen></iframe><iframe width="${width}" height="${height}" src="path/to/pdf2.pdf" frameborder="0" allowfullscreen></iframe>`)
    

    【讨论】:

    • 如果出现此错误,除了 iframe 之外还有其他选择吗? “在框架中显示‘url’,因为它将‘X-​​Frame-Options’设置为‘SAMEORIGIN’”
    猜你喜欢
    • 2013-04-20
    • 1970-01-01
    • 2013-09-30
    • 2019-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-01
    • 1970-01-01
    相关资源
    最近更新 更多