0

enter image description here

function PrintElem(elem) {
   Popup($(elem).html());
   document.getElementByClass('purchasprint').style.display = 'show';

 }

 function Popup(data) {
   var mywindow = window.open('', 'Print Expense Invoice',
     'height=600,width=1000');

   mywindow.document.write(data);

   mywindow.document.close();
   mywindow.focus();

   mywindow.print();
   mywindow.close();

   return true;

 }

Here is my script i'm trying to remove or modify date formet of header where date is placed. i have tried lot of way but i'm stuck on this any suggestion?

Devang Naghera
  • 731
  • 6
  • 13
Adarsh
  • 21
  • 2
  • 6
  • Possible duplicate of [Removing page title and date when printing web page (with CSS?)](https://stackoverflow.com/questions/2573603/removing-page-title-and-date-when-printing-web-page-with-css) – Bhaumik Pandhi Mar 08 '18 at 11:47
  • 1
    Possible duplicate of [Remove header and footer from window.print()](https://stackoverflow.com/questions/8228088/remove-header-and-footer-from-window-print) – Adam Kozlowski Mar 08 '18 at 11:50

1 Answers1

2

Historically, it's been impossible to make these things disappear as they are user settings and not considered part of the page you have control over.

http://css-discuss.incutio.com/wiki/Print_Stylesheets#Print_headers.2Ffooters_and_print_margins

However, as of 2017, the @page at-rule has been standardized, which can be used to hide the page title and date in modern browsers:

@page { size: auto;  margin: 0mm; }
PPL
  • 6,357
  • 1
  • 11
  • 30