mblink / document-viewer-ts

PDF and docx viewer for Vanilla JavaScript and React applications
MIT License
7 stars 0 forks source link

How to use this module in next js? #23

Open crypmancer opened 5 days ago

crypmancer commented 5 days ago

image

Here is my code

image

But I am getting the same error as in that image. Plz help me how to use this one.

jleider commented 5 days ago

Your worker source has to be the pdfjs library.

<Viewer
  documentId="doc-1"
  documentUrl="/path/to/your/document.pdf"
  workerSrc="/public/path/to/pdfjs/pdf.worker.min.mjs"
/>