I am using Tinymce editor to insert the Body content into pdf report如果我将表格添加到编辑器中,并尝试在pdf报告中反映相同的内容,那么最后在pdf-report中添加一个额外的空页,只有在插入表格时文本段落、图像等没有问题时才会发生这种情况
我的wicked-pdf gem版本是wkhtmltopdf (0.1.2) wkhtmltopdf-binary (0.9.9.1)
这是针对Rails2应用程序的
发布于 2021-01-19 19:24:54
将一个div放在html代码的最后。喜欢
<% @questions.each do |question| %>
<% if question.id == @questions.last.id %>
<div></div>
<% end %>
<% end %>或者,您可以根据您的代码放置一个div。
在您的html.put中添加分区后,css中的以下行:
div.alwaysbreak { page-break-before: always; }
div.nobreak:before { clear:both; }
div.nobreak{ page-break-inside: avoid; }对我来说很管用
https://stackoverflow.com/questions/23362223
复制相似问题