# Unexpected server response (403) while retrieving PDF

**URL:** <https://pdfjs.community/t/unexpected-server-response-403-while-retrieving-pdf/3339>\
**Category:** Technical Support\
**Created:** [July 2, 2024, 11:31am UTC](https://pdfjs.community/t/unexpected-server-response-403-while-retrieving-pdf/3339 "2024-07-02T11:31:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Steven](https://pdfjs.community/u/Steven)\
**Post date:** [July 2, 2024, 11:31am UTC](https://pdfjs.community/t/unexpected-server-response-403-while-retrieving-pdf/3339/1 "2024-07-02T11:31:40Z")

</div>

Hi,

On the local server when we tried to run the annotation screen it is given this error due to file URL and library location.  
Please suggest why this error given. It is working on live server.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/e/e54adc08287b00e3522e3f33e1584f087ed8a4a2.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [July 2, 2024, 6:26pm UTC](https://pdfjs.community/t/unexpected-server-response-403-while-retrieving-pdf/3339/3 "2024-07-02T18:26:41Z")

</div>

Hi there,

If this is working on a live server but not on localhost, this is most likely due to the path attribute in the WebViewer constructor not pointing to the right location where the static files are located.

Please see this guide for reference:

> **[Integrating PDF.js Express Plus with NPM | Documentation](https://pdfjs.express/documentation/get-started/npm)**

Best regards,  
Kevin Kim
