Skip to content

Commit c7d1b06

Browse files
committed
Remove PDFJSWorker
1 parent 78b6a74 commit c7d1b06

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/SimplePDFParser.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import EventEmitter from 'events';
22
import sharp from 'sharp';
3-
import PDFJS from 'pdfjs-dist';
4-
import PDFJSWorker from 'pdfjs-dist/build/pdf.worker.entry';
3+
import PDFJS from 'pdfjs-dist/es5/build/pdf';
54

65
import NodeCanvasFactory from './NodeCanvasFactory';
76

@@ -184,7 +183,6 @@ export default class SimplePDFParser extends EventEmitter {
184183
* resolves with an object containing text and image elements separately.
185184
*/
186185
async parseRaw() {
187-
PDFJS.GlobalWorkerOptions.workerSrc = PDFJSWorker;
188186
const loadingTask = PDFJS.getDocument(new Uint8Array(this.fileBuffer));
189187
const pdf = await loadingTask.promise;
190188

0 commit comments

Comments
 (0)