Javascript iframe中未显示超过1页的pdf文件
我正在访问base64中超过1页的pdf文件,并使用iframe进行显示。下面是我在iframe中显示pdf文件的代码Javascript iframe中未显示超过1页的pdf文件,javascript,html,angularjs,Javascript,Html,Angularjs,我正在访问base64中超过1页的pdf文件,并使用iframe进行显示。下面是我在iframe中显示pdf文件的代码 <div style="padding: 15px 0px 15px 0px;height: 100%;width: 100%"> <iframe ng-if="fileExtension == 'pdf'" src="data:application/pdf;base64,{{attachment}}" style="height:
<div style="padding: 15px 0px 15px 0px;height: 100%;width: 100%">
<iframe ng-if="fileExtension == 'pdf'" src="data:application/pdf;base64,{{attachment}}" style="height: 100%;width: 100%" >
</iframe>
</div>
对于超过1页的pdf文件,iframe为空。请帮助我。提前谢谢。修改代码
<iframe ng-if="fileExtension == 'pdf'" src="data:application/pdf;base64,{{attachment}}" style="height: 100%;width: 100%" scrolling="auto">
</iframe>
为什么不使用对象??/我尝试了上面的代码,但它对我来说不起作用,甚至只是pdf文件。