Questions tagged «pdf.js»

2
如何使用pdf.js [关闭]
在这里很难说出要问什么。这个问题是模棱两可,含糊,不完整,过于宽泛或夸张的,不能以目前的形式合理地回答。如需帮助澄清此问题以便可以重新打开, 请访问帮助中心。 7年前关闭。 我正在考虑使用pdf.js(允许将pdf嵌入网页的开放源代码工具)。没有任何有关如何使用它的文档。 我假设我要做的是使用标题中引用的脚本制作一个html页面,然后在正文中放置某种函数调用,并在其中包含文件名和位置的数组。有谁可以帮我离开这里吗?

3
pdf.js:使用base64文件源而不是url渲染pdf文件
我正在尝试使用pdf.js从pdf渲染页面 通常,使用网址,我可以这样做: PDFJS.getDocument("http://www.server.com/file.pdf").then(function getPdfHelloWorld(pdf) { // // Fetch the first page // pdf.getPage(1).then(function getPageHelloWorld(page) { var scale = 1.5; var viewport = page.getViewport(scale); // // Prepare canvas using PDF page dimensions // var canvas = document.getElementById('the-canvas'); var context = canvas.getContext('2d'); canvas.height = viewport.height; canvas.width = viewport.width; // // Render PDF …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.