开发者

table generation issue in pdf generation using prawn

    **I want to insert a table inside a parent table column.**

e.g :-
     <table>
      <tr>
        <th> Type </th>
        <th> Rate </th>
        <th> Duration </th>
      </tr>
      <tr>
      <td> Time <br/>
        <table>
           <tr>
            <th> Name</th>
            <th> Rate </th>
            <th> Duration </th>
          </tr> 
          <tr>
            <td> Tom </td>
            <td> $100 </td>
            <td> 25 </td>
         </tr>
         <tr>
            <td> Tom1 </td>
            <td> $200 </td>
            <td> 20 </td>开发者_如何学Python
         </tr>
         <tr>
            <td> Tom2 </td>
            <td> $300 </td>
            <td> 26 </td>
         </tr>
        </table>
      </td>
      <td> $1000</td>
      <td> 65 </td>
     </tr>
    </table>

 This is in html format . I want to display content in the same format in pdf using prawn.


Have you tried using WickedPDF. It's a PDF generation tool, but you write the HTML instead of learning new syntax etc. It also has the added bonus of being able to use Webkit syntax so html5 is consistant throughout


You are trying to nest tables. Take a look at this question and answer: prawn PDF: I need to generate nested tables

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜