Comments (5)
Are you encountering an error that looks something like this?
If so, you're having a CORS issue on your production server that is blocking the worker file. Make sure your worker-src
is defined and specifies 'self'
so it doesn't attempt to fall back onto the child-src
.
from ngx-extended-pdf-viewer.
@Jammy1299 The issue happens in only production because you're using a different server in production. Usually, you also have a firewall and other security measures in production. When you say it works again after downgrading, you'll want to check whether your server has a problem with *.mjs
files. On the other hand, that's unlikely because the other JavaScript files are loaded correctly.
from ngx-extended-pdf-viewer.
Yes, there's an extra assets/
in the URL when the viewer tries to load the worker into the main thread. But it should never reach that line. So let's focus on the first attempt to load it. Your screenshot says the file is blocked. Blocked by what?
BTW, a workaround is to load the pdf.worker*.mjs
yourself. For instance, you can add a <script>
tag to the index.html
. However, that's not a good solution because it costs performance and because the version number of the file changes with every release.
from ngx-extended-pdf-viewer.
I have downgraded to version 18.1.14 and now Its working with my angular version 16.
Can we make it to work with version 19 or 20?
Also why this issue only coming in production but not in local.
from ngx-extended-pdf-viewer.
Did you manage to solve the issue?
from ngx-extended-pdf-viewer.
Related Issues (20)
- Printing is broken in version 21.0.0 (light mode only) HOT 1
- Turn off the auto jump-to-page when a phrase is found HOT 8
- The button class changes all buttons default padding, top and bottom in the project HOT 2
- Missing icon: assets/images/annotation-paperclip.svg HOT 6
- Search for word/phrase in TextLayer and return the relevant HTMLSpanElements HOT 2
- PDF Search Results based on words HOT 1
- Leaking styles break app-layout HOT 2
- PDF not load HOT 3
- Docu Site Attributes don´t show: No data found HOT 3
- Some Properties are undefined in textLayerRendered HOT 2
- The ES5 build contains Promise.withResolvers() without a polyfill
- The FindController needs to be informed about changes of the PageViewMode
- Do not reload pdf.worker every time HOT 4
- Add Antoine's eraser widget as a demo to the showcase HOT 1
- Find + Highlight all missing `selected` class HOT 8
- Allow users and developers to use regular expressions when searching HOT 1
- PDFScriptLoaderService fails to properly load the pdfjs viewer after destroyed. HOT 7
- Writing with pen, scrolling with hand
- In e2e test with chromium:headless the PDF is not rendered HOT 2
- No 'annotationEditorEvent' for 'size-changed' and 'removed' with custom stamp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-extended-pdf-viewer.