在较低分辨率下看不到Base 64 PDF

时间:2019-03-07 16:37:22

标签: html pdf modal-dialog base64 bootstrap-modal

我有一个可以打开模态的按钮,使用常规分辨率没有问题,但是如果我使用移动分辨率打开相同的模态,它将不会显示。

这是我的代码:

function compareTwoObjects(a, b) {
  let matches = 0
  Object.keys(a).forEach(key => {
    if (b[key] && b[key] === a[key]) {
      matches++
    }
  })
  return matches === 1
}

使用64位pdf文件填充对象数据,这里有一个示例:

<div class="modal fade in" tabindex="-1" id="modal_pdf_simple" role="dialog" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
    <div class="modal-content" style="height: 90%;">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
        </div>
        <div class="modal-body" style="height: 84vh;overflow-y: auto !important;">
            <object id="object_pdf_simple"  data="" type="application/pdf" width="100%" style="height: 79vh;">
                <p>This browser does not support PDFs.</p>
            </object>
        </div>
    </div>
</div>

我正在使用Galaxy S5分辨率(360x640),并且正在使用Bootstrap 3

如果您需要更多信息,请告诉我

0 个答案:

没有答案