# External librairies doesn't work in webrequest

**URL:** <https://community.appfarm.io/t/external-librairies-doesnt-work-in-webrequest/682>\
**Category:** Bug reports\
**Created:** [September 12, 2023, 8:37am UTC](https://community.appfarm.io/t/external-librairies-doesnt-work-in-webrequest/682 "2023-09-12T08:37:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yassine.tebib](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/yassine.tebib/32/74_2.png) [@Yassine.tebib](https://community.appfarm.io/u/Yassine.tebib)\
**Post date:** [September 12, 2023, 8:37am UTC](https://community.appfarm.io/t/external-librairies-doesnt-work-in-webrequest/682/1 "2023-09-12T08:37:22Z")

</div>

Hey Appfarm

i’m trying to generate a pdf using html2pdf in appfarm. the problem is that i can’t use html2pdf in a webrequest ( html2pdf not defined ). same if i want to use something like “document.getelementbyid”

is there any workaround to store my PDF somewhere and use it in my webrequest ? i tried a lot of stuff

thanks a lot

---

<div class="post-metadata">

**Author:** ![Shahitha](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/shahitha/32/66_2.png) [@Shahitha](https://community.appfarm.io/u/Shahitha)\
**Post date:** [September 13, 2023, 8:45am UTC](https://community.appfarm.io/t/external-librairies-doesnt-work-in-webrequest/682/2 "2023-09-13T08:45:36Z")

</div>

Hi Yassine!

Have you tried using the Run Code-action node to generate the PDF using html2pdf? You can then try to send the PDF through the web request. Remember to also add the library as a Script URL under Custom Header Tags in Environments.

Let me know if this solves it!

---

<div class="post-metadata">

**Author:** ![Yassine.tebib](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/yassine.tebib/32/74_2.png) [@Yassine.tebib](https://community.appfarm.io/u/Yassine.tebib)\
**Post date:** [September 13, 2023, 10:21am UTC](https://community.appfarm.io/t/external-librairies-doesnt-work-in-webrequest/682/3 "2023-09-13T10:21:41Z")

</div>

Hey  
thank you for you answer  
that’s what i tried but i wasn’t able to store my pdf somewhere ! tried also to convert it to base64 but no way to store it. any advice ?
