Open dylanvdmerwe opened 6 years ago
Since this package relies on copying the worker from PDF.js, you cannot use the regular implementation for web components. Please follow the README:
angular.json
{
"glob": "**/*",
"input": "node_modules/@teamhive/stencil-pdf-viewer/dist/pdfviewer",
"output": "./pdfviewer"
}
main.ts (or app.module.ts)
import '@teamhive/stencil-pdf-viewer/dist/pdfviewer';
I'm having the same issue. my package.json info:
Ok I found the solution.
That is a pretty weird/magical one.
First, you need to remove node_modules
and package-lock.json
Than you need to install any version of pdf.js-dist, but older than 2.1.
Like
npm i pdfjs-dist@2.0.943
Even if in your package module you have apparently the good version.
Working with the same configuration of the above package.json
I am trying to test the component in an ionic v3 app by following these instructions to set things up.
However I have the following error when opening a page with the
hive-pdf-viewer
on it.The
www
directory looks like this with the pdfviewer files:System info: