title: how to customize the page setup in javascript print
body: <p>i want to print a page through javascript function window.print(). i am using 62mm wide paper roll for this . but when i print it takes length of a4 paper size. how i reduce the length of paper in javascript.
  i used the css for this but didn't work.
  the css i used for this is as follow:</p>
  
  <pre><code>@media print {
    body { 
      color : #000000; 
      background : #ffffff; 
      font-family : "Times New Roman", Times, serif;
      font-size : 12pt; 
      width: 2.4409449in /*width of index card*/
      height:2.4409449in /*height of index card*/
    }
  }
  </code></pre>
  
  <p>please help me thanks in advance..</p>