【发布时间】:2017-01-03 15:51:07
【问题描述】:
我无法正确渲染 pdf 文件。我尝试了以下三种单独的尝试,它们没有一起使用。我尝试使用前两个(在 Handlebars-express 框架中使用嵌入和嵌套 iframe 的对象)。当我无法弄清楚我做错了什么时,我尝试使用 app.js 脚本在客户端渲染并在客户端上嵌入。路径是正确的。任何帮助将不胜感激。
<div>
<embed width="100%" height="100%" src="/pdf/file1.pdf" type="application/pdf">
</div>
<object data="/pdf/file1.pdf" type="img" width="100%" height="100%">
<iframe src="/pdf/file1.pdf" width="100%" height="100%" style="border: none;">
It looks like the browser you are using does not support PDFs. However, you can still download my resume to view it: <a href="/pdf/file1.pdf">Download PDF</a>
</iframe>
</object>
<script src="src/app.js"></script>
【问题讨论】:
标签: pdf server handlebars.js template-engine