# Force download PDF file

**URL:** <https://forum.wixstudio.com/t/force-download-pdf-file/71896>\
**Category:** Ask the community\
**Tags:** code, wix-studio, question\
**Created:** [July 2, 2025, 7:15pm UTC](https://forum.wixstudio.com/t/force-download-pdf-file/71896 "2025-07-02T19:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user1508](https://avatars.discourse-cdn.com/v4/letter/u/5f8ce5/32.png) [@user1508](https://forum.wixstudio.com/u/user1508)\
**Post date:** [July 2, 2025, 7:15pm UTC](https://forum.wixstudio.com/t/force-download-pdf-file/71896/1 "2025-07-02T19:15:53Z")

</div>

when a add a pdf document link to a download button, wix studio will display the pdf document in a separate tab within the browser window. How can make the button force download the pdf file to the users device?

---

<div class="post-metadata">

**Author:** ![onemoretime](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/onemoretime/32/104023_2.png) [@onemoretime](https://forum.wixstudio.com/u/onemoretime)\
**Post date:** [July 3, 2025, 12:07am UTC](https://forum.wixstudio.com/t/force-download-pdf-file/71896/2 "2025-07-03T00:07:21Z")

</div>

Hi, @user1508 !!

Hello, my previous post might be of some help, so feel free to check the link below. 😇

> [@Clickable download buttons only for site members](https://forum.wixstudio.com/t/clickable-download-buttons-only-for-site-members/64847/3):
>
> Hi, user3965 !! I wanted to try it out myself, so I gave it a shot. I think this should work for now! Please make any improvements on your own! wink +1 I used a method where the page is reloaded once after the login process, but if anyone knows a better solution, please let me know. thinking // frontend import { getPdfDownloadUrlFunction } from "backend/getDownloadUrl.web.js"; import { authentication } from "wix-members-frontend"; import wixLocationFrontend from "wix-location-frontend"…
