PDF Export doesn't look right with tables

Last post 08-25-2015, 9:52 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  08-20-2015, 6:36 PM 80706

    PDF Export doesn't look right with tables

     I'm having trouble with exporting HTML tables to PDF.  The PDF table cells are not the right width, and the text isn't aligned properly.

     

    I took a few screenshots and posted them here:  http://imgur.com/a/G8HnM

     

     The first image is the aspx page with the editor.  The  second image is what the PDF looks like.  They're not similar.  

     

    My code is very simple, just a call to:  RTEditor.SavePDF("temp.pdf");


    Is this an issue with the editor, or should I change my code?   I read a little

     

    I'm using this as my referenced assembly:  packages\CuteEditor.6.7.1.5\lib\CuteEditor.dll.  The properties of the dll say "CuteEditor 6.7 Build 2014--04-16".  

    Thanks

  •  08-25-2015, 9:52 AM 80759 in reply to 80706

    Re: PDF Export doesn't look right with tables

    Hi,

     

    you need to set the width for the <td> , then it should shows correct in pdf too.

     

    <table border="0" cellspacing="2" cellpadding="2" width="500">
         <tbody>
             <tr>
                 <td width="200">1</td>
                 <td width="200">2</td>
             </tr>
             <tr>
                 <td>&nbsp;3</td>
                 <td>&nbsp;4</td>
             </tr>
         </tbody>

    </table>

     

    Regards,

     

    ken 

View as RSS news feed in XML