Wednesday, 29 July 2015

Printing without the URL at the page header

Below is the sample HTML which will hide the URL at the page header when printing with Javascript.


   <html moznomarginboxes >
   <head>
   <style type="text/css">

      @page{                size: auto;                margin: 3mm;           }

   </style>
   </head>
   <body>
         My page content goes here..
   </body>
   </html>


The simple way to print the current page is to call the following JavaScript method:

   window.print();

The Javascript library to print the specific element/container:

  https://github.com/jasonday/printThis


No comments:

Post a Comment

We are moving

We are moving this blog to our new blog site: https://ciysys.com/blog/nodejs.htm