I want such api server script which generate that document pdf

i send notification so in notification i want send the link when user click on it it show quotaion pdf or other document pdf
i want to say that i can generate pdf externally

Check the reference: Download PDF API

i create server script
pdf script

args = frappe.form_dict[“name”]

doc = frappe.get_doc(“Quotation”, args)

html = frappe.get_print(“Quotation”, args, “Standard”, doc=doc, no_letterhead=“no_letterhead”)

args = frappe.form_dict[“name”]
frappe.local.response.filename = f"{args}.pdf"
frappe.local.response.filecontent = get_pdf(html)
frappe.local.response.type = “download”

when i call my api (https://mysite.com/api/method/generate_pdf?name=SAL-QTN-2024-00062) then it show
pdf response
i want provide so that use this link can get the pdf so he no need to login