how do i just remove the print header and footer at the same time i want to put page information
because my custom print format, page code is not working, every page is coming Page 1 of 1
below is custom code if anyone can help<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Material Request</title> <style> body { margin: 0; padding: 20px; font-family: Arial, sans-serif; font-size: 9px; background-color: #f5f5f5; } .document { width: 100%; max-width: 800px; margin: 0 auto; background-color: white; border: 1px solid black; padding: 0; } /* Header */ .header { text-align: center; font-weight: bold; font-size: 10px; padding: 3px; border-bottom: 1px solid black; background-color: white; } .title-section { text-align: center; font-weight: bold; font-size: 10px; padding: 3px; border-bottom: 1px solid black; background-color: white; } .address-section { border-bottom: 1px solid #000; } .address-row { display: flex; border-bottom: 1px solid #000; } .from-section, .to-section { width: 50%; padding: 4px; } .from-section { border-right: 1px solid #000; } .section-header { font-weight: bold; margin-bottom: -3px; margin-top: -3px; font-size: 10px; } .section-headerx { font-weight: bold; margin-bottom: -3px; margin-top: -3px; font-size: 10px; padding: 3px; } .company-info { margin-bottom: -3px; font-size: 9px; } .meta-row { display: flex; } .from-meta-section, .to-meta-section { width: 50%; padding: 0; } .from-meta-section { border-right: 1px solid #000; } .meta-info { display: flex; justify-content: space-between; margin-top: 1px; line-height: 1px; } .meta-info td { padding: 1px 1px 1px 0; font-size: 8px; vertical-align: top; } .intro-text { text-align: center; padding: 6px; border-bottom: 0px solid #000; font-size: 8px; } /* .brand { margin: 8px 0 4px; font-weight: 700; font-size: 10px; } */ .data-table { width: 100%; /*border-collapse: collapse;*/ font-size: 7px; border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; } .data-table, .data-table th, .data-table td { border: 1px solid #000; padding: 0; margin: 0; line-height: 1; text-align: middle; word-wrap: break-word; text-overflow: ellipsis; white-space: normal; } .data-table { width: 100%; /*border-collapse: collapse;*/ font-size: 7px; border-collapse: collapse; border-left:none !important; border-right:none !important; margin-top:-1px; /*border-spacing: 0;*/ /*margin: 0;*/ /*padding: 0;*/ } .data-table th { background: #f0f0f0; padding: 0px 0px; font-weight: bold; font-size: 7px; } .center { text-align: center; } .data-table th:first-child, .data-table td:first-child { border-left: none; } /* Remove right border from last column */ .data-table th:last-child, .data-table td:last-child { border-right: none; } /* Material Request table column widths */ .w-sr { width: 1%; } .w-wop { width: 7%; } .w-mrno { width: 7%; } .w-order { width: 4%; } .w-style { width: 10%; } .w-item { width: 24%; white-space: normal; } .w-lot { width: 5%; } .w-color { width: 7%; } .w-uom { width: 4%; text-align: left; } .w-gsm { width: 4%; text-align: left; } .w-width { width: 4%; text-align: left; } .w-rolls { width: 4%; text-align: left; } .w-qty { width: 6%; text-align: left; } .w-rfid { width: 13%; white-space: normal; text-align: left; } /* Section header */ .section-header { font-weight: bold; margin-bottom: -3px; margin-top: -3px; font-size: 10px; } /* Totals rows */ .totals-row td { background: var(--g); font-weight: 700; } .sign-brand { width: 100%; display: flex; justify-content: flex-end; font-size: 12px; font-weight: 700; } .sign-line { width: 100%; display: flex; justify-content: space-between; font-size: 10px; } .print-meta { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; } .print-meta p { margin: 0; } .print-info { display: flex; gap: 10px; justify-content: end; } /* Missing sections */ .amount-in-words { padding: 4px; /* less top/bottom padding */ border-bottom: 1px solid #000; /* use solid black (or pick a color) */ font-size: 10px; /* smaller font */ display: block; font-weight: bold; /* ensures it behaves like a block */ width: 100%; /* spans full width */ } .signature-section { padding: 8px; border-bottom: 1px solid var(--b); font-size: 10px; } .footer { display: flex; justify-content: space-between; padding: 8px; font-size: 10px; } .reference-section, .terms-section, .conditions-section, .signature-section { padding: 8px; border-bottom: 1px solid black; min-height: 80px; font-size: 10px; } .conditions-title { text-decoration: underline; font-weight: bold; margin-bottom: 8px; } .signature-line { display: flex; justify-content: space-between; margin-top: 40px; } .signature-line span { font-size: 10px; border-bottom: 1px ; padding-bottom: -3px; width: 120px; text-align: center; } .footer { display: flex; justify-content: space-between; padding: 8px; font-size: 10px; } .print-info { display: flex; gap: 5px; } .remarks-section { padding: 4px; border-bottom: 1px solid black; font-size: 7px; } /* Print-specific styles */ @media print { .label { border: none !important; outline: none !important; background: transparent !important; box-shadow: none !important; } * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } } </style> </head> <body> <div class="document"> <!-- Header --> <div class="header"> {{ doc.company or "GLOBE INTERNATIONAL INDUSTRIES" }} </div> <div class="title-section">Fabric Delivery Challan</div> <!-- Parties / Details --> <div class="address-section"> <div class="address-row"> <!-- From --> <div class="from-section"> <div class="section-header">From</div> <div class="company-info"> <strong >{{ doc.company or "GLOBE INTERNATIONAL INDUSTRIES" }}</strong ><br /> STREET# 13, PLOT# 207, PUBLIC FREE ZONE,<br />ALEXANDRIA, EGYPT </div> </div> <!-- To --> <div class="to-section"> <div class="section-header">To</div> <div class="company-info"> <strong>GLOBE CUTTING SECTION</strong><br> STREET# 13, PLOT# 207, PUBLIC FREE ZONE,<br>ALEXANDRIA, EGYPT </div> </div> </div> <!-- Meta lines (merged fields) --> <div class="meta-row"> <div class="from-meta-section"> <table class="meta-info"> <tr> <td><strong>Delivery Challan No</strong></td> <td><strong>: {{ doc.name }}</strong></td> </tr> <tr> <td><strong>Date</strong></td> <td> <strong >: {{ doc.transaction_date or doc.schedule_date or "" }}</strong > </td> </tr> <tr> <td><strong>Item Dept</strong></td> <td><strong>: Fabric</strong></td> </tr> </table> </div> <div class="to-meta-section"> <table class="meta-info"> <tr> <td><strong>Purpose</strong></td> <td> <strong >: Cutting Inhouse</strong > </td> </tr> <tr> <td><strong>Challan Type</strong></td> <td><strong>: Internal</strong></td> </tr> <!--<tr>--> <!-- <td><strong>Customer</strong></td>--> <!-- <td><strong>: {{ "" }}</strong></td>--> <!--</tr>--> {% set customer_name = "" %} {% if doc.order_sheet_no %} {% set customer_name = frappe.db.get_value("Order Sheet", doc.order_sheet_no, "agent") or "" %} {% endif %} <tr> <td><strong>Customer</strong></td> <td><strong>: {{ customer_name }}</strong></td> </tr> </table> </div> </div> </div> <!-- Main Items Table --> <table class="data-table"> <thead> <tr> <th class="w-sr">Sr</th> <th class="w-wop">Work Order Plan No.</th> <th class="w-mrno">Material Request No.</th> <th class="w-order">Order Sheet</th> <th class="w-style">Style No</th> <th class="w-item">Item Description</th> <th class="w-lot">Lot No</th> <th class="w-color">Col. Code / Print</th> <th class="w-uom">Uom</th> <th class="w-gsm">Gsm</th> <th class="w-width">Width</th> <th class="w-rolls">Rls</th> <th class="w-qty">Qty</th> <th class="w-rfid">RFID</th> </tr> </thead> <tbody> {% if doc.actual_roll_send %} {% for item in doc.actual_roll_send %} <tr> <td class="w-sr">{{ loop.index }}</td> <td class="w-wop">WOC-{{ (doc.work_order_plan or "")[-5:] }}</td> <td class="w-mrno">{{ (item.parent or doc.name or "")[-7:] }}</td> <td class="w-order">{{ doc.order_sheet_no or "" }}</td> <td class="w-style">{{ doc.style_no or "" }}</td> <td class="w-item" style="white-space: normal"> {{ item.fabric_name or item.item_code or "" }} </td> <td class="w-lot">{{ item.lot_nobatch or "" }}</td> <td class="w-color">{{ item.color or "" }}</td> <td class="w-uom center"> {{ frappe.db.get_value("Item", item.fabric_name or item.item_code, "stock_uom") if item.fabric_name or item.item_code else "" }} </td> <td class="w-gsm center">{{ item.gsm or "" }}</td> <td class="w-width center"> {{ item.width or "" }}{% if item.width %}"{% endif %} </td> <td class="w-rolls center">{{ item.roll_no or "" }}</td> <td class="w-qty center"> {{ "%.2f"|format(item.weight_kg | float(0)) if item.weight_kg else "" }} </td> <td class="w-rfid" style="white-space: normal"> {{ item.rfid_tag or "" }} </td> </tr> {% endfor %} {% else %} {% for item in doc.items %} <tr> <td class="w-wop">WOC-{{ (doc.work_order_plan or "")[-5:] }}</td> <td class="w-mrno">{{ (doc.name or "")[-7:] }}</td> <td class="w-order">{{ doc.order_sheet_no or "" }}</td> <td class="w-style">{{ doc.style_no or "" }}</td> <td class="w-item" style="white-space: normal"> {{ item.item_name or item.item_code or "" }} </td> <td class="w-lot">{{ item.batch_no or "" }}</td> <td class="w-color">{{ item.color or "" }}</td> <td class="w-uom center">{{ item.uom or item.stock_uom or "" }}</td> <td class="w-gsm center">{{ item.gsm or "" }}</td> <td class="w-width center"> {{ item.width or "" }}{% if item.width %}"{% endif %} </td> <td class="w-rolls center">{{ item.qty or "" }}</td> <td class="w-qty center"> {{ "%.2f"|format(item.qty | float(0)) if item.qty else "" }} </td> <td class="w-rfid" style="white-space: normal"> {{ "" }} </td> </tr> {% endfor %} {% endif %} <!-- Main totals --> <tr class="totals-row"> <td class="w-wop"></td> <td class="w-mrno" colspan="9" style="text-align: left; padding-left: 10px" > <strong >{% if doc.actual_roll_send %}{{ doc.in_words or "" }}{% else %}{{ doc.in_words or "" }}{% endif %}</strong > </td> <td class="w-rolls center"> {% if doc.actual_roll_send %} {% set ns_rolls = namespace(count=0) %} {% for item in doc.actual_roll_send %} {% set ns_rolls.count = ns_rolls.count + 1 %} {% endfor %} {{ ns_rolls.count }} {% else %} {% set ns_items = namespace(count=0) %} {% for item in doc.items %} {% set ns_items.count = ns_items.count + 1 %} {% endfor %} {{ ns_items.count }} {% endif %} </td> <td class="w-qty center"> {% if doc.actual_roll_send %} {% set ns_weight = namespace(total=0) %} {% for item in doc.actual_roll_send %} {% if item.weight_kg %} {% set ns_weight.total = ns_weight.total + (item.weight_kg | float(0)) %} {% endif %} {% endfor %} {{ "%.2f"|format(ns_weight.total) }} {% else %} {% set ns_qty2 = namespace(total=0) %} {% for item in doc.items %} {% set ns_qty2.total = ns_qty2.total + (item.qty | float(0)) %} {% endfor %} {{ "%.2f"|format(ns_qty2.total) }} {% endif %} </td> <td class="w-rfid"></td> </tr> </tbody> </table> <!-- Remarks --> <div class="remarks-section"> 1. Remark : {{ doc.remark or "" }}<br> 2. Vehicle No : {{ doc.vehicle or "" }}<br> 3. <br> 4. </div> <!-- Signature --> <div class="signature-section"> <div style="text-align: right; margin-bottom: 20px; font-weight: bold"> For {{ doc.company or "GLOBE INTERNATIONAL INDUSTRIES" }} </div> <div class="signature-line"> <span>Prepared By</span> <span>Checked by</span> <span>Accepted by</span> <span>Authorised Signature</span> </div> </div> <!-- Footer --> <div class="footer"> <div></div> <div class="print-info"> <span>Print Date & Time :</span> <span>{{ frappe.utils.now_datetime().strftime("%d-%b-%y") }}</span> <span >{{ frappe.utils.now_datetime().strftime("%-I:%M:%S %p") }}</span > <span>Page 1 of 1</span> </div> </div> </div> </body> </html>

