我正在使用Dompdf(http://pxd.me/dompdf/www/index.php)作为带有php的pdf到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"><< input type hidden<br>
<input type="image" value="input type image"><< 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中。我真的找不到这些变化。
将css放入复选框style=";高度:15px;宽度:15px;边框:1px纯黑"