locked
Microsoft One note is not updating RRS feed

  • Question

  • User81789783 posted

    i m working on project and using print.js lib like this

     <button type="button" onclick="printJS({printable: 'printJS-form',scanStyles:false  , type: 'html',maxWidth:800 ,  css: 'StyleSheet2.css'})">
        Print Form
     </button>

    where i am using StyleSheet2.css as below

    .result {
      visibility: hidden;
    }
    
    /*body
    {
      margin: 25mm 25mm 25mm 25mm;
    }*/
    /*div {
      padding: 10px;
      margin:20px;
    
    
    }
    
    table {
      padding: 0px;
      margin:20px;
    
    
    }*/
    
    /*https://www.tutorialrepublic.com/css-tutorial/css-media-types.php */
    /*https://www.w3schools.com/cssref/css3_pr_mediaquery.asp*/
    /*https://jsfiddle.net/crabbly/Lvktrb5n/*/
    /*https://stackoverflow.com/questions/16807044/printing-landscape-or-portrait-in-firefox-and-ie-8/16995878 */
    /*@page { size: Letter auto;padding:0px;}*/
     @page {
             size: Letter landscape ;   /* auto is the initial value */
             /*margin: 15cm;*/
          }
    @page
     { margin-top: 30px; 
       margin-left:28cm;
       padding-left:6cm;
    } 
    /*{padding: 0px}*/
      /*@media print { table { color: green; margin: 10px;padding: 0mm; line-height: 1.2;} }*/
          @media print { table { color: olive;} }
      /*@media print {
        th{
            font-size: 12pt;
        }
        td {
            font-size: 16pt;
        }
        }*/
    @media print and (orientation: landscape) {
        /* landscape styles */
    }
      
      /*@page { margin-left: 1px}*/ /* All margins set to 2cm */
        /*@page { margin-right: 0.3cm }*/ /* All margins set to 2cm */
    
    
    
    
    
    

    in above css file i  m using olive color while prinitng but its not updating any help

    Saturday, August 17, 2019 2:05 PM

All replies

  • User-719153870 posted

    Hi erum,

    @media print { table { color: olive;} }

    This is a right format, so i suggest you can check your printJS function.

    Please use F12 to see if there's any error message.

    Best Regard,

    Yang Shen

    Monday, August 19, 2019 7:38 AM
  • User-474980206 posted

    printJS still uses the browsers print functions. most browsers suppress background colors when printing. the user can override this behavior with browser settings. the only workaround is to use a background image instead of color.

    Tuesday, August 20, 2019 2:59 PM