Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

PDF.js in Ionic 3 : Where and how should I load the webworker?

$
0
0

@distante wrote:

I am trying to implement Mozilla's PDF.js into an Ionic 3 App, I installed pdfjs-dist and the typings from dt.

I can correctly import and call the library functions but It does not work because the web-worker is not found:

GET http://localhost:8100/build/main.worker.js 404 (Not Found)

PDFWorker_initialize	@	pdf.js:2842
PDFWorker	@	pdf.js:2815
getDocument	@	pdf.js:2266
PdfEditorPage	@	pdf-editor.ts:18
createClass	@	core.es5.js:10873
createDirectiveInstance	@	core.es5.js:10701
createViewNodes	@	core.es5.js:12064
createRootView	@	core.es5.js:11969
callWithDebugContext	@	core.es5.js:13184
debugCreateRootView	@	core.es5.js:12644
ComponentFactory_.create	@	core.es5.js:9890
ComponentFactoryBoundToModule.create	@	core.es5.js:3427
NavControllerBase._viewInit	@	nav-controller-base.js:564
(anonymous)	@	nav-controller-base.js:356
t.invoke	@	polyfills.js:3
onInvoke	@	core.es5.js:4128
t.invoke	@	polyfills.js:3
r.run	@	polyfills.js:3
(anonymous)	@	polyfills.js:3
t.invokeTask	@	polyfills.js:3
onInvokeTask	@	core.es5.js:4119
t.invokeTask	@	polyfills.js:3
r.runTask	@	polyfills.js:3
o	@	polyfills.js:3
invoke	@	polyfills.js:3

The only comment about I found is this one in other thread

But the OP does not respond any question about it, just keeps posting the mozilla site.

Does anybody can point me out in the right direction? I am not sure where and how to import the web worker. I have not found any main.worker.js file.

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles