l10n.js - locale.properties 404 (Not Found)
See original GitHub issueAttach (recommended) or Link to PDF file here:
Configuration:
- Web browser and its version: All main browsers (Edge, Chrome, Opera, Firefox)
- Operating system and its version: Windows 7 Pro
- PDF.js version: pdfjs-1.9.426-dist
- Is a browser extension: ?
Steps to reproduce the problem:
- I have the pdf.js called in an IFrame that’s calling the following code:
<script> $(document).ready(function () { $('#fileList li').click(function (e) { var fileName = $(this).html(); var url = '~/Scripts/pdfjs-dist/Web/viewer.html?file=' + fileName $('#iframePdfViewer').attr('src', url); }); }); </script>
- When the pdf gets loaded, note that everything is working as expected but I would like to get rid of these errors/warning if possible but I’ll deal with this one first as the rest of my issues are warnings rather than an error. This is the error I’m getting:
/MyApp/Scripts/pdfjs-dist/web/locale/locale.properties Failed to load resource: the server responded with a status of 404 (Not Found)
The attached snapshot provides additional information:
Note that my locale.properties is definitely available.
What is the expected behavior? (add screenshot)
No error generated.
Any ideas?
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Can not find "locale.properties" file from PDF.js - Stack Overflow
Adding .properties MIME type configuration inside web.config file should work: ... Reference: l10n.js - locale.properties 404 (Not Found).
Read more >How to display pdf using pdf.js mozila - MSDN
Failed to load resource : the server responded with a status of 404 (Not Found) l10n.js:351 http://localhost:49943/pdfjs/web/locale/locale.
Read more >Specific extension files are not found(404) - OutSystems
Hi. I'm trying to use "PDF.js" without forge, cz it isn't match my environment that i can't update by myself. then, I faced...
Read more >742099 - Localize pdf.js strings and replace with the final ...
We used temporary strings when landing pdf.js and they can't currently be localised. We should make sure to come up with finalized strings...
Read more >sgpatil-ngx-extended-pdf-viewer - npm
Check this page for live demos and source code examples! ... The default files pdf.js , pdf-worker.js , and viewer.js use a modern...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timvandermeij
I found the solution. Not only does it remove the error mentioned above (i.e. 404 - locale.properties not found), it also removes the 200+ warnings I had.
All I had to do was to add a new MIME type in IIS 7:
File name Extension: .properties MIME Type: application/octet-stream
That’s it.
Did you run
gulp locale
? Either the file is not in the specified path or XHR cannot access it due to rights issues. This is an issue of the custom deployment and not something we can help with without access to a minimal example that shows the issue.