src/main.mjs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main.mjs
@@ -43,7 +43,7 @@ */ async function getPdfPages(filepath) { const buf = fs.readFileSync(filepath); const pdfDoc = await pdfLib.PDFDocument.load(buf); const pdfDoc = await pdfLib.PDFDocument.load(buf, { ignoreEncryption: true }); const pages = pdfDoc.getPages().length; return pages; } @@ -344,7 +344,7 @@ book.format = ext; book.file = filepath; book.url = url; book.pages = await getPdfPages(filepath); book.pages = await getPdfPages(filepath).catch(e => 0); resolve(true); }); stream.on("error", (err) => {