ERPNext Conference 2019* ERPNext.com Blog

Return pdf as response

customization

#1

Hi,

I have written code to generate pdf but unable to send pdf to browser in web services.

Please let me know how can i achieve…
Let me know any other information needed…


#2

Check this, hope it helps.

JS called

Python response


#3

Is exists some function which can return pdf as response? For example:

response= get_pdf(doctype_name=“name”)
with open(“file.pdf”,“wb”) as file:
file.write(response)

Function download pdf returns nothing