We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78b6a74 commit c7d1b06Copy full SHA for c7d1b06
src/SimplePDFParser.js
@@ -1,7 +1,6 @@
1
import EventEmitter from 'events';
2
import sharp from 'sharp';
3
-import PDFJS from 'pdfjs-dist';
4
-import PDFJSWorker from 'pdfjs-dist/build/pdf.worker.entry';
+import PDFJS from 'pdfjs-dist/es5/build/pdf';
5
6
import NodeCanvasFactory from './NodeCanvasFactory';
7
@@ -184,7 +183,6 @@ export default class SimplePDFParser extends EventEmitter {
184
183
* resolves with an object containing text and image elements separately.
185
*/
186
async parseRaw() {
187
- PDFJS.GlobalWorkerOptions.workerSrc = PDFJSWorker;
188
const loadingTask = PDFJS.getDocument(new Uint8Array(this.fileBuffer));
189
const pdf = await loadingTask.promise;
190
0 commit comments