here in localStorage.getItem(‘ansbooklet’) getting pdf url.
var pdfUrl = localStorage.getItem('ansbooklet');
var pdf = new PDFAnnotate("pdf-container", encodeURI(pdfUrl), {
onPageUpdated(page, oldData, newData) {
console.log(page, oldData, newData);
},
ready() {
console.log("Plugin initialized successfully");
},
scale: 1.5,
pageImageCompression: "MEDIUM",
});
I am getting below error
Access to fetch at ‘https://abcs.kbcsthiland.edu.in/bcs360/2022-2023/AnswerBooklet/H/B/BIT%20221/0037845805101.pdf’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
can you help me to fix this error?