久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <bdo id='EzH9r'></bdo><ul id='EzH9r'></ul>
      <tfoot id='EzH9r'></tfoot>
    1. <legend id='EzH9r'><style id='EzH9r'><dir id='EzH9r'><q id='EzH9r'></q></dir></style></legend>

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

      1. <small id='EzH9r'></small><noframes id='EzH9r'>

        將 HTML 表格另存為圖像

        Save HTML table as an image(將 HTML 表格另存為圖像)
            <tbody id='L8w60'></tbody>
          <i id='L8w60'><tr id='L8w60'><dt id='L8w60'><q id='L8w60'><span id='L8w60'><b id='L8w60'><form id='L8w60'><ins id='L8w60'></ins><ul id='L8w60'></ul><sub id='L8w60'></sub></form><legend id='L8w60'></legend><bdo id='L8w60'><pre id='L8w60'><center id='L8w60'></center></pre></bdo></b><th id='L8w60'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='L8w60'><tfoot id='L8w60'></tfoot><dl id='L8w60'><fieldset id='L8w60'></fieldset></dl></div>
          • <small id='L8w60'></small><noframes id='L8w60'>

              <tfoot id='L8w60'></tfoot>
              • <bdo id='L8w60'></bdo><ul id='L8w60'></ul>

                <legend id='L8w60'><style id='L8w60'><dir id='L8w60'><q id='L8w60'></q></dir></style></legend>

                1. 本文介紹了將 HTML 表格另存為圖像的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在構建一個網站,該網站從表單中獲取數據(人名)并將其發布到下一頁表格中的自定義注釋"中.我希望用戶能夠將他們的筆記"保存為帶有自定義名稱的圖像.有沒有辦法將特定的 HTML 表格另存為 PNG?也許對網頁上的特定坐標進行屏幕截圖?

                  I have a website I am building that takes data (the person's name) from a form and posts it into a customized "note" in a table on the next page. I want the user to then be able to save their "note" as an image with their customized name on it. Is there a way to save a SPECIFIC HTML TABLE as a PNG? Maybe take a screenshot of a specific coordinate on a web page?

                  如果沒有,有沒有辦法從 HTML 畫布中的表單呈現已發布的 PHP 內容?

                  If not is there a way to render posted PHP content from the form in an HTML canvas?

                  任何幫助都會很棒.我現在有點過頭了.

                  Any help would be great. I'm in a little over my head right now.

                  推薦答案

                  雖然您可以使用各種工具呈現 HTML,但您不能確定這些工具是否會以與瀏覽器呈現的方式相同的方式呈現 HTML.

                  While you can render HTML using a variety of tools, you can't be sure that those tools will render the HTML the same way your browser renders it.

                  如果您的最終目標是生成帶有文本的圖像,那么讓我們解決該問題,而不是嘗試使您建議的解決方案奏效.

                  If your end goal is to generate an image with text on it, then let's solve that problem instead of trying to make the solution you suggested work.

                  看看 PHP 的 imagettftext() 函數.它包含一個 Example #1,它從可以存儲在任何變量中的文本創建一個小的、簡單的圖像......包括表單變量.

                  Have a look at PHP's imagettftext() function. It contains an Example #1 which creates a small, simple image from text that can be stored in any variable ... including a form variable.

                  通過使用此示例,并添加其他一些PHP 的 GD 函數,你可以制作一個像樣的表格副本,并確保它看起來完全符合你的要求,而不是 html2ps 或其他一些工具呈現它的方式.

                  By using this example, and adding a few other of PHP's GD functions, you can make a decent replica of a table, and make sure it looks exactly the way you want it, rather than the way html2ps or some other tool renders it.

                  <?php
                  // Set the content-type
                  header('Content-Type: image/png');
                  
                  // Create the image
                  $im = imagecreatetruecolor(400, 30);
                  
                  // Create some colors
                  $white = imagecolorallocate($im, 255, 255, 255);
                  $grey = imagecolorallocate($im, 128, 128, 128);
                  $black = imagecolorallocate($im, 0, 0, 0);
                  imagefilledrectangle($im, 0, 0, 399, 29, $white);
                  
                  // The text to draw
                  $text = isset($_POST['name']) ? $_POST['name'] : "name";
                  // Replace path by your own font path
                  $font = 'arial.ttf';
                  
                  // Add some shadow to the text
                  imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
                  
                  // Add the text
                  imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
                  
                  // Using imagepng() results in clearer text compared with imagejpeg()
                  imagepng($im);
                  imagedestroy($im);
                  ?>
                  

                  以下是上述腳本生成的示例輸出:

                  Here's sample output generated by the above script:

                  請注意,您需要根據以上鏈接中的說明提供 arial.ttf.

                  Note that you'll need to provide arial.ttf per the instructions at the link above.

                  如果一切都不起作用,請先在屏幕上和您的網絡服務器的錯誤日志中查找錯誤,然后再在這里跟進.您的 Web 服務器上可能沒有安裝 PHP 的 GD 模塊.如果是這種情況,您應該咨詢您的服務器管理員,以確保您可以使用所需的內容.

                  If things don't work, look for errors both on-screen and in your web server's error log FIRST, before following up here. It's possible that PHP's GD module is not installed on your web server. If this is the case, you should check with your server administrator to make sure what you need is available to you.

                  這篇關于將 HTML 表格另存為圖像的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                  <small id='0XhpO'></small><noframes id='0XhpO'>

                  <tfoot id='0XhpO'></tfoot>

                      <tbody id='0XhpO'></tbody>
                      <bdo id='0XhpO'></bdo><ul id='0XhpO'></ul>

                      • <i id='0XhpO'><tr id='0XhpO'><dt id='0XhpO'><q id='0XhpO'><span id='0XhpO'><b id='0XhpO'><form id='0XhpO'><ins id='0XhpO'></ins><ul id='0XhpO'></ul><sub id='0XhpO'></sub></form><legend id='0XhpO'></legend><bdo id='0XhpO'><pre id='0XhpO'><center id='0XhpO'></center></pre></bdo></b><th id='0XhpO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0XhpO'><tfoot id='0XhpO'></tfoot><dl id='0XhpO'><fieldset id='0XhpO'></fieldset></dl></div>
                          <legend id='0XhpO'><style id='0XhpO'><dir id='0XhpO'><q id='0XhpO'></q></dir></style></legend>

                            主站蜘蛛池模板: 日本精品视频一区二区三区四区 | 久久精品| 欧美1区| 国产亚洲日本精品 | 欧美成人手机在线 | 在线观看中文字幕亚洲 | 一区二区精品 | 日韩免费三级 | 欧美日本一区 | 精品国产18久久久久久二百 | 在线色网 | 黄色片免费看视频 | 国产aⅴ爽av久久久久久久 | 国产日韩精品一区二区三区 | 成人激情视频免费在线观看 | 91精品国产综合久久福利软件 | 特黄色一级毛片 | 久久tv在线观看 | 色狠狠桃花综合 | www久久久 | 91久久| 天天干天天谢 | 国产一级电影在线观看 | 99热精品在线观看 | 天天天堂| 欧美性jizz18性欧美 | 午夜精品| 一区二区免费 | 福利片在线看 | 成人欧美一区二区三区在线播放 | 欧美精品在线播放 | 欧美一级免费看 | 欧美日高清视频 | 亚洲一区二区av | 五月婷婷视频 | 在线观看www视频 | 在线免费观看欧美 | 亚洲电影第1页 | 欧美精品福利视频 | 视频羞羞| 国产精品电影网 |