PDF Export problem with tables

3 posts, 0 answers
  1. Jeff
    Jeff avatar
    6 posts
    Member since:
    Mar 2014

    Posted 23 Aug 2014 Link to this post

    I'm trying to export an HTML table from RadEditor and the text is getting jumbled up. I can reproduce this by pasting the code below into the RadEditor Export to PDF demo. What am I doing wrong?
    <table height="180" style="width: 720px;" border="1">
        <colgroup><col /></colgroup>
        <tbody>
            <tr>
                <td>
                <p style="text-align: center;"><span style="font-family: Arial; font-size: 48px;">Your Name Here<br />
                (555) 555-5555</span></p>
                </td>
            </tr>
        </tbody>
    </table>
  2. Jeff
    Jeff avatar
    6 posts
    Member since:
    Mar 2014

    Posted 25 Aug 2014 in reply to Jeff Link to this post

    More information: the code below exports to PDF from RadEditor correctly. This leads me to believe the RadEditor Export to PDF function is not processing the <span> tag.
    <table height="180" style="width: 720px;" border="1">
        <colgroup><col /></colgroup>
        <tbody>
            <tr>
                <td>
                <p style="text-align: center; font-size: 48px;">Your Name Here<br />
                (555) 555-5555</p>
                </td>
            </tr>
        </tbody>
    </table>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 26 Aug 2014 Link to this post

    Hello Jeffrey,

    The PDF library used to export the content is quite limited and such cases cannot be properly handled.

    Indeed, span elements with inline stylization cannot be exported and due to that I am unable to suggest you an easy approach to resolve this behavior.

    What I can suggest is integrating a third-party or custom library to serve the PDF exporting functionality as described in the blog post

    Another possible way is to implement a custom filter that transfers the inline styles from the span element to the paragraph, although such logic could break different formatting in one paragraph.

    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top