pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<legend id='sYVOg'><style id='sYVOg'><dir id='sYVOg'><q id='sYVOg'></q></dir></style></legend>
  • <small id='sYVOg'></small><noframes id='sYVOg'>

  • <i id='sYVOg'><tr id='sYVOg'><dt id='sYVOg'><q id='sYVOg'><span id='sYVOg'><b id='sYVOg'><form id='sYVOg'><ins id='sYVOg'></ins><ul id='sYVOg'></ul><sub id='sYVOg'></sub></form><legend id='sYVOg'></legend><bdo id='sYVOg'><pre id='sYVOg'><center id='sYVOg'></center></pre></bdo></b><th id='sYVOg'></th></span></q></dt></tr></i><div class="5gyjez0" id='sYVOg'><tfoot id='sYVOg'></tfoot><dl id='sYVOg'><fieldset id='sYVOg'></fieldset></dl></div>

      • <bdo id='sYVOg'></bdo><ul id='sYVOg'></ul>

      1. <tfoot id='sYVOg'></tfoot>
      2. 自動打開 PDF 文件的打印機對話框

        Open Printer Dialog for PDF file Automatically(自動打開 PDF 文件的打印機對話框)

        <legend id='fmm1M'><style id='fmm1M'><dir id='fmm1M'><q id='fmm1M'></q></dir></style></legend>
          <bdo id='fmm1M'></bdo><ul id='fmm1M'></ul>

              <tfoot id='fmm1M'></tfoot>

              <small id='fmm1M'></small><noframes id='fmm1M'>

                <tbody id='fmm1M'></tbody>
                <i id='fmm1M'><tr id='fmm1M'><dt id='fmm1M'><q id='fmm1M'><span id='fmm1M'><b id='fmm1M'><form id='fmm1M'><ins id='fmm1M'></ins><ul id='fmm1M'></ul><sub id='fmm1M'></sub></form><legend id='fmm1M'></legend><bdo id='fmm1M'><pre id='fmm1M'><center id='fmm1M'></center></pre></bdo></b><th id='fmm1M'></th></span></q></dt></tr></i><div class="5n5g5ut" id='fmm1M'><tfoot id='fmm1M'></tfoot><dl id='fmm1M'><fieldset id='fmm1M'></fieldset></dl></div>

                  本文介紹了自動打開 PDF 文件的打印機對話框的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我知道有多種方法可以將 PDF 打印到與服務器位于同一網絡的網絡打印機,但這對我沒有幫助,因為服務器是遠程的.在我的情況下,用戶單擊打印標簽"的鏈接,然后生成并輸出為其設置格式的 PDF 文件.我目前將文件輸出流式傳輸"到瀏覽器,以便 Adob??e Reader 使用以下代碼自動打開它:

                  I know that there are ways to print a PDF to a network printer located on the same network as the server, but that does not help me as the server is remote. In my situation a user clicks a link to "print labels" which then generates and outputs a PDF file formatted for them. I currently "stream" the file output to the browser such that Adobe Reader automatically opens it using the following code:

                  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
                  header("Content-type: application/pdf");
                  header('Content-Disposition: attachment; filename="labels.pdf"');
                  readfile($ServerPathToFile);
                  

                  還有什么我可以添加到這個代碼中的東西,它會自動觸發打印對話框打開,這樣他們只需要點擊打印?在這種情況下,Google CloudPrint 不是一種選擇,其他需要在用戶端進行特殊設置"的東西也不是一種選擇……因為這將被各種用戶使用.

                  Is there something else I can add to this code that will automatically trigger the print dialogue box to open so that they only have to click print? In this case, Google CloudPrint is not an option, nor are other things that require "special setup" on the user end...as this will be used by a variety of users.

                  推薦答案

                  您可以將 PDF 輸出到同一域上的子窗口(