Replace pdftotext and pdfinfo with pdf-worker

This commit is contained in:
Martynas Bagdonas 2023-03-31 12:48:05 +01:00
parent 3a0731a024
commit bd9a40562f
6 changed files with 142 additions and 125 deletions

View file

@ -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 };
}