0

我正在使用 Dompdf ( http://pxd.me/dompdf/www/index.php ) 作为 pdf 到 php 的 html 转换器。

但它不显示复选框和其他输入字段。我正在使用示例中的代码并尝试呈现以下 html:

    <head><body><fieldset>
  <legend>legend</legend>
  <input type="text" value="input type text"><br>
  <input type="password" value="input type password"><br>
  <input type="checkbox" value="input type checkbox"><br>
  <input type="checkbox" checked="" value="input type checkbox"><br>
  <input type="radio" value="input type radio"><br>
  <input type="radio" checked="" value="input type radio"><br>
  <input type="submit" value="input type submit"><br>
  <input type="reset" value="input type reset"><br>
  <input type="file" value="input type file"><br>
  <input type="hidden" value="input type hidden">&lt;&lt; input type hidden<br>
  <input type="image" value="input type image">&lt;&lt; input type image<br>
  <input type="button" value="input type button"><br>
  <button>button</button><br>
  <textarea>textarea
    this is a 
    test
    foo
    </textarea><br>
  <select>
    <option>FOO</option>
    <option selected="">BAR</option>
  </select><br>
</fieldset> </body></head>

我从这里获取代码https://code.google.com/p/dompdf/downloads/list。我从这里复制了一个例子:https ://github.com/dompdf/dompdf/wiki/Usage (只需用上面的代码替换html部分)。

它根本不显示输入字段。

示例包含表单字段: http: //pxd.me/dompdf/www/examples.php

编辑:我在这里找到了讨论:https ://code.google.com/p/dompdf/issues/detail?id=79

它说它是固定的,但没有出现在代码中,而只出现在 svn trunk 中。我真的找不到那些变化。

4

1 回答 1

0

将 CSS 放入复选框 style="height: 15px;width:15px;border:1px solid black;"

于 2021-07-16T05:52:12.593 回答