Update PDF.js in PDF reader

This commit is contained in:
Martynas Bagdonas 2023-04-12 11:15:46 +03:00
parent 5880d62000
commit e6e424836d
3 changed files with 4 additions and 5 deletions

View file

@ -24,8 +24,8 @@
*/
const WORKER_URL = 'chrome://zotero/content/xpcom/pdfWorker/worker.js';
const CMAPS_URL = 'chrome://zotero/content/xpcom/pdfWorker/cmaps/';
const STANDARD_FONTS_URL = 'chrome://zotero/content/xpcom/pdfWorker/standard_fonts/';
const CMAPS_URL = 'resource://zotero/pdf-reader/cmaps/';
const STANDARD_FONTS_URL = 'resource://zotero/pdf-reader/standard_fonts/';
const RENDERER_URL = 'resource://zotero/pdf-renderer/renderer.html';
class PDFWorker {

@ -1 +1 @@
Subproject commit 590af780053f198838c0f3b4afa3f197ef45453e
Subproject commit 40d044fc8aeb91d7855aa22b3025101e89c3a011

View file

@ -35,8 +35,7 @@ async function getPDFWorker(signatures) {
catch (e) {
await exec('npm ci', { cwd: modulePath });
await exec('npm run build', { cwd: modulePath });
// TODO: Don't copy 'cmaps' and 'standard_fonts' directories once pdf-reader is updated
await fs.copy(path.join(modulePath, 'build'), targetDir);
await fs.copy(path.join(modulePath, 'build', 'worker.js'), path.join(targetDir, 'worker.js'));
}
signatures['pdf-worker'] = { hash };
}