Generate PDF print format from the server side

I would like to ask in regards to generating PDF within the server side. Are there any possible ways to generate PDF with a print format? So far, I have came up that it might be possible to use this link and fetch it with using a library.

http://localhost:8001/api/method/frappe.utils.print_format.download_pdf?doctype=Sales%20Invoice&name=SINV-00025&format=(print-format)&no_letterhead=0

However, I ended up error. I have already setup the role permissions for the guest but still it doesn’t work.

Thanks,

iRaySpace

I have already solved this one. I used Frappe-Client, modified some code in order to accomodate for the API urls.

Thanks,

iRaySpace

1 Like