You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ej2-react-pdfviewer inaccurately references pdfium when the PdfViewComponent component is used in nested routes.
For example, if the component is hosted at https://www.myapp.com/a-route/ it throws the following error:
Failed to execute 'importScripts' on 'WorkerGlobalScope': The script '.../pdfium' failed to load
Documentation suggests copying the folder "ej2-pdfviewer-lib" into the Public folder. But this only works if rendering the component at the project root. The component does work if copying "ej2-pdfviewer-lib" to a matching subfolder. Continuing the example above, providing "....com/a-route/ej2-pdfviewer-lib/" But surely this is not sustainable since routes can be dynamic. Besides, duplicating the code for each route is just a waste of resources.
Either is a bug or I'm missing a concept that's not documented or represented in your demo solutions.
The text was updated successfully, but these errors were encountered:
Most likely is it due to use of a relative path to load the 'ej2-pdfviewer-lib' in PdfViewer.prototype.getScriptPathForPlatform
part of pdfviewer.js as follows:
This statement load the rendering path rather than the public root as documentation advices (and is preferred).
The ej2-react-pdfviewer inaccurately references pdfium when the PdfViewComponent component is used in nested routes.
For example, if the component is hosted at https://www.myapp.com/a-route/ it throws the following error:
Documentation suggests copying the folder "ej2-pdfviewer-lib" into the Public folder. But this only works if rendering the component at the project root. The component does work if copying "ej2-pdfviewer-lib" to a matching subfolder. Continuing the example above, providing "....com/a-route/ej2-pdfviewer-lib/" But surely this is not sustainable since routes can be dynamic. Besides, duplicating the code for each route is just a waste of resources.
Either is a bug or I'm missing a concept that's not documented or represented in your demo solutions.
The text was updated successfully, but these errors were encountered: