How to print the page?

I have a Custom Page I want to print that page content. I know the print() function in Browser I don’t want that. is any print format is there in erpnext to render my template with header and footer. please help me to get the solution

Or else I can download as pdf like this frappe.render_pdf