Replace pdftotext and pdfinfo with pdf-worker
This commit is contained in:
parent
3a0731a024
commit
bd9a40562f
6 changed files with 142 additions and 125 deletions
|
@ -35,7 +35,8 @@ async function getPDFWorker(signatures) {
|
|||
catch (e) {
|
||||
await exec('npm ci', { cwd: modulePath });
|
||||
await exec('npm run build', { cwd: modulePath });
|
||||
await fs.copy(path.join(modulePath, 'build', 'worker.js'), path.join(targetDir, 'worker.js'));
|
||||
// TODO: Don't copy 'cmaps' and 'standard_fonts' directories once pdf-reader is updated
|
||||
await fs.copy(path.join(modulePath, 'build'), targetDir);
|
||||
}
|
||||
signatures['pdf-worker'] = { hash };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue