久久久久久久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>

                            主站蜘蛛池模板: 亚洲欧美另类在线 | 国产高潮好爽受不了了夜夜做 | 国产成人免费一区二区60岁 | 五月婷婷激情网 | 97精品超碰一区二区三区 | 精品国产一区三区 | 一区二区久久精品 | 亚洲国产一区二区视频 | 自拍偷拍亚洲视频 | av在线免费观看不卡 | 免费人成在线观看网站 | 999免费网站| 欧美日韩精品一区二区天天拍 | 午夜av电影| 伊人狠狠操 | 午夜视频大全 | 亚洲精品国产一区 | 精品99在线| 日日碰狠狠躁久久躁96avv | 成人毛片在线观看 | 丁香一区二区 | 欧美成人黄色小说 | 国产欧美精品 | 色啪网| 中文字幕在线免费视频 | 亚洲国产免费 | 欧美片网站免费 | 国产高潮好爽受不了了夜色 | 国产成人小视频 | 欧美精品一区二区三区四区 | 美日韩一区二区 | 天天色影视综合 | 亚洲一区二区三区在线视频 | 99久久亚洲 | 久草欧美视频 | 自拍偷拍亚洲欧美 | 精品视频免费 | 国产免费观看一级国产 | 国产精品久久久久久久免费大片 | 一区二区三区视频在线观看 | 国产综合精品 |