function print(data){

    var innerdata = document.getElementById(data)
    var printwindow = window.open("", "MsgWindow", "width=500,height=500");
    printwindow.document.write("<!DOCTYPE html><html lang=\"fa\" dir=\"rtl\"><head><link href=\"/print/print.css\"><link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">"+
    "<link href=\"/print/fonts.css\"></head><body class=\"rtl\"><div style=\"width:1000px;direction: rtl;margin:auto;margin-top: 50px;border: 1px solid;padding:10px\">"+innerdata.innerHTML+"</div> <div><a class=\"btn btn-primary-gradien\" onclick=\"printpage()\"  >چاپ صفحه</a></div><script>function printpage(){window.print()}</script></body>")
    
   
}