【发布时间】:2013-12-09 21:53:53
【问题描述】:
我正在使用 pdf.js 查看器在网页中显示 PDF 文件。在服务器端,我有一个文件夹查看器。在这个文件夹中,我有脚本和内容文件夹。
在服务器脚本中,
// Configuration
app.configure(function(){
app.use(express.static(__dirname + '/scripts'));
});
所以如果我把localhost/viewer.html 显示给查看器。
为了打开一个文件,我输入了localhost/viewer.html?file=sample.pdf。如果 viewer.html 和 sample.pdf 在同一个文件夹中,这可以正常工作。但我想从脚本文件夹中的 viewer.html 的内容文件夹加载输入文件
【问题讨论】:
标签: javascript html node.js pdf.js