使用 flying-saucer-pdf 实现html转换pdf补充

1、打印出A4纸的格式。

   样式中加入

  

@page {
   size: 8.5in 11in;
   /*@bottom-center {*/
   /*content: "page " counter(page) " of  " counter(pages);*/
   /*}*/
}

 

2、pdf分页 

 如果想分页,加

1 <div class="content" style="page-break-before:always;">
View Code

 

 

3、table td 换行

1         <table cellspacing="0" cellpadding="0" width="100%"  style="table-layout:fixed; word-break:break-strict;word-wrap:break-word;word-break:break-all;">

 

4、input 的 disabled="disabled" 无效?不知道怎么解决?哪位大神搞定给我留言。


 

posted @ 2018-05-10 13:53  ~动静挚爱~  阅读(1691)  评论(0编辑  收藏  举报