ERPNext Conference 2019* Blog

Return pdf as response




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…


Check this, hope it helps.

JS called

Python response


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:

Function download pdf returns nothing