# I cannot use PDF.JS Express to open a PDF file by url in a Vue Project, please help me figure out how is that happen

**URL:** <https://pdfjs.community/t/i-cannot-use-pdf-js-express-to-open-a-pdf-file-by-url-in-a-vue-project-please-help-me-figure-out-how-is-that-happen/660>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [March 24, 2021, 5:09am UTC](https://pdfjs.community/t/i-cannot-use-pdf-js-express-to-open-a-pdf-file-by-url-in-a-vue-project-please-help-me-figure-out-how-is-that-happen/660 "2021-03-24T05:09:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Charles](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@Charles](https://pdfjs.community/u/Charles)\
**Post date:** [March 24, 2021, 5:09am UTC](https://pdfjs.community/t/i-cannot-use-pdf-js-express-to-open-a-pdf-file-by-url-in-a-vue-project-please-help-me-figure-out-how-is-that-happen/660/1 "2021-03-24T05:09:50Z")

</div>

**PDF.js Express Version**

**Detailed description of issue**  
{When I download the Vue Demo on the website, I replace the default file path to my own file path, But  
it just can’t work. The console of Chrome give me the error info:“Access to fecth ‘url’ has been blocked by CORS policy”}. It means that the url is on another remote server, pdf.js express can’t open it. However, I have solved the CORS problem to make sure every file can be fetched from every request. I can open the same file in Chrome or any other pdf viewer software. Can anyone help me?

**Expected behaviour**  
{I expecte to open the remote file by url in a Vue Project.}

**Does your issue happen with every document, or just one?**  
{Every document}

**Link to document**  
{[http://119.29.53.191:7069/download-file-0.0.1/download?fileType=PDF\_DOCUMENT&filePath=/usr/local/rgms-resources/document/de0b2446-7092-4b64-8bba-31dd466e7625\_reading02-07.pdf](http://119.29.53.191:7069/download-file-0.0.1/download?fileType=PDF_DOCUMENT&filePath=/usr/local/rgms-resources/document/de0b2446-7092-4b64-8bba-31dd466e7625_reading02-07.pdf)}

**Code snippet**  
{WebViewer({  
path: this.path,  
initialDoc: “[http://119.29.53.191:7069/download-file-0.0.1/download?fileType=PDF\_DOCUMENT&filePath=/usr/local/rgms-resources/document/de0b2446-7092-4b64-8bba-31dd466e7625\_reading02-07.pdf](http://119.29.53.191:7069/download-file-0.0.1/download?fileType=PDF_DOCUMENT&filePath=/usr/local/rgms-resources/document/de0b2446-7092-4b64-8bba-31dd466e7625_reading02-07.pdf)”,  
// replace with your own PDF file  
}, this.$refs.viewer).then((instance) =\> {  
// call apis here  
});

---

_[View the full topic](https://pdfjs.community/t/i-cannot-use-pdf-js-express-to-open-a-pdf-file-by-url-in-a-vue-project-please-help-me-figure-out-how-is-that-happen/660)._
