为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

print.always_print_silent is not working.

more options

I am developing a Point of Sale application and want it to specifically run on Firefox. I am running Firefox 45.0.2

I created a boolean entry print.always_print_silent in about:config to enable silent printing but it is not working. Print dialog is still showing. How can I correct it ?

I am developing a Point of Sale application and want it to specifically run on Firefox. I am running Firefox 45.0.2 I created a boolean entry print.always_print_silent in about:config to enable silent printing but it is not working. Print dialog is still showing. How can I correct it ?

所有回复 (2)

more options

After a cross check now I found that it is working for all other pages except one. Even my other local developed pages are sent to printer without dialog. Following is the code for the page I want to print :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
        <meta content="utf-8" http-equiv="encoding">    
  <title>Arfat Dairy</title>
        <style>
   body{width:68mm; font-family:'Calibri'; margin:10px;}
   h1{font-size:26px; line-height:28px; margin:0px; padding:0px;}
   h3{font-size:30px; margin:20px;}
   h4{font-size:20px; line-height:20px;}
   #wrapper{border:1px solid #000; width:68mm;}
  </style>
    </head>
    <body>
     <div id="wrapper">
            <h1 style="text-align:center; font-size:36px; margin:0px;">ARFAT DAIRY</h1>
            <h5 style="text-align:center; margin:0px;">RISHI TOLA, CHOWK ROAD, FATEHGANJ, FAIZABAD</h4>
            <h4 style="text-align:center; margin:0px;">Permission Slip</h3>
                        <table width="100%" style="font-size:20px; text-align:center;">
                <tr>
                    <td align="right">Date : <b>15-04-2016&nbsp; &nbsp; <b style="font-size:16px;">01:04:34</b></b></td>
                </tr>
                <tr>
                 <td>Sorry you have already received your <b style="font-size:26px;">BUFFALO MILK on 2016-04-15 00:04:34</b></td>
                </tr>
            </table>
              
  </div>
    </body>
</html>

由cor-el于修改

more options

It is easier to share HTML on a site like Pastebin, to avoid the wiki engine trying to interpret it.

I can't think of any HTML that should cause Firefox to show the Print dialog for just the one page out of all the pages you tested. Is there any difference in how it is presented, for example, is it displayed in a frame or iframe?