External librairies doesn't work in webrequest

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

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!

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 ?