开发者

table generation issue in pdf generation using prawn

开发者 https://www.devze.com 2023-04-04 13:45 出处:网络
**I want to insert a table inside a parent table column.** e.g :- <table> <tr> <th> Type </th>
    **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

精彩评论

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

关注公众号