如何使用Angular 6中的功能绑定PDF文档上的缩放事件?

时间:2019-06-08 18:37:04

标签: javascript angular

iframe中有一个pdf文档,其上方是一个矩形框。我想以放大页面的相同比例缩放框(增加高度和宽度)。

enter image description here

由于使用Adobe插件显示了该文档,因此我无法使用任何事件或功能捕获 zoom 。由于其他一些限制,我不能使用其他插件,例如ng2-pdf-piewer,pdf.js等。

html-

<div id="document">
    <iframe [src]='byPassedFilePath' id="idocument" type="application/pdf" width="100%" [height]='pdfHeight'></iframe>
</div>

<div id="rectangle">
    <iframe id="irectangle"></iframe>
</div>

css-

#document{
    overflow: auto;
    position: absolute;
    z-index: 1;
    width: 100%;
}

#idocument{
    border: none;
}

#rectangle{
    height:50px;
    width:100px;
    border:2px solid blue;
    position: absolute;
    z-index: 2;
}

#irectangle{
    height: 100%;
    width: 100%;
    border: none;
}

找不到与缩放有关的任何内容。

0 个答案:

没有答案