I have a library, in the original it was as follows. The .css file was in the root, and there was a folder called images that css looks like this: /images/imagem.png. Well, we had to make an improvement in that library. Then the css folder, the js folder and the images folder were created. We set up the following folder structure:
gen / modal / viewerPDF / js
gen / modal / viewerPDF / css
gen / modal / viewerPDF / images
gen / modal / viewerPDF / viewer.html
Notice that the main html file is in the root of the main viewer folder. Well, what happens that css assembles, otherwise the viewer would be all messed up and not, but it gives many errors, of which put one of the errors here. Solving one solves the others. The error below:
link Failed to load resource: the server responded with a status of 404 (Not Found)
Looking at the mounted url, it does not exist. There is no such thing:
... css / images ....
In css to get the images I did:
content: url(images/[email protected]);
content: url(../images/[email protected]);
content: url(~/images/[email protected]);
And yet it continues the cited bugs demonstrated in Chrome devtools. How do I resolve this?
This is the header of the page that calls css and js:
<html dir="ltr" mozdisallowselectionprint moznomarginboxes>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
<title>PDF.js viewer</title>
<link rel="stylesheet" href="css/viewer.css"/>
<!--<script src="compatibility.js"></script>-->
<!-- This snippet is used in production (included from viewer.html) -->
<!--<link rel="resource" type="application/l10n" href="locale/locale.properties"/>-->
<script src="js/l10n.js"></script>
<script src="js/pdf.js"></script>
<!--<script src="debugger.js"></script>-->
<script src="js/viewer.js"></script>
</head>