Problem get PDF


I tried use Axios and problem with get a PDF file. With XML file is correct. Where is my error sorry my question I need to use Axios because node http not resolve return of erp api for download files. I believe it is something in the conversion of pdf to base64 I have tried in many ways without success.

Do not understand. Why do you use a Function-Node with Axios and not the HTTP Request node?

I try get but not receive file. I try get in Postman with success. My response header Content-Type application/octet-stream, Content-Disposition attachment; filename=“32201011638543000236550020000330271430887396-nfe.pdf”. I try use default node http but return file this image:

When I run the node I did post above it works perfectly fine:

So should it also for you.

Thank you for your help and follow up. Works perfectly with your example but my problem is when trying to connect and download PDF file to another server below the images:

The received binary file does not come in the correct PDF format.

You can try to attach this node after the HTTP-Request node:


I need send Cookie I send this format {{JSON.parse(’{“Cookie”: “JSESSIONID=…”}’)}}

Ok, but do honestly not understand how it relates to my proposed solution. Did you try it? Did it work? How is the cookie related to all of that?

1 Like

Btw. if you need help with this problem please open a new issue. We have to make sure to keep discussions on topic, else it gets very messy and people which have a similar issue will so not find your question and so also not the solution.