我尝试在本地主机上运行pdf.js示例,在下载之后我做到了
make server
但是,当我尝试运行与下载捆绑在一起的示例时,我得到了这个错误
missing variable name
var in = i * n;
http://localhost/pdf.js/src/function.js
Line 174
成功获取PDF文件
GET http://localhost/pdf.js/examples/helloworld/helloworld.pdf 200 OK 210ms
作为一项要求,我是否遗漏了什么?
晚上好,我想为我的用户创建一个功能,允许他们阅读一个pdf文件,而不下载或打印它。他们将只能读取pdf文件。我尝试了不起作用的pdf.js,我还尝试通过脚本将我的pdf转换成html,我也尝试了这个php代码,但是出现了“下载和打印”按钮:
<?php
// The location of the PDF file
// on the server
$filename = "/path/to/the/file.pdf";
// Header content type
header("Content-typ
我的页面上有“下载pdf”按钮。该页面包含php和html代码,我想下载页为pdf(在浏览器窗口中不打开)。我尝试了一种使用jspdf的代码,它将div内容隐藏为pdf格式,但不应用css和与原始页面相同的格式。
js代码:
<script type="text/javascript" src="https://parall.ax/parallax/js/jspdf.js"></script>
var doc = new jsPDF();
var specialElementHandlers = {
'#editor
我正试图在我的HTML项目中用Django渲染pdf。我使用包形式js,并通过以下链接将html呈现为pdf:。
我的模板:
<div class="container-fluid py-5 bg-light">
<div class="col-xl-10 bg-white" id="pdf_portion">
<p>Lots of staff is in this div. I just skip those unnecessary things in this question.</p&g