EDITOR,HTML Table borders and PDF Export

2 posts, 0 answers
  1. Luka
    Luka avatar
    13 posts
    Member since:
    Oct 2013

    Posted 13 Jan 2014 Link to this post

    Hi! I'm just back from solving a problem with HTML Table borders when being exported to PDF by editor. It seems that the PDF exporter has a bug or a feature :D that makes the border property of the <TABLE> element for the outline border. So that means you need to give borders to every <TD> element that needs one. But if you put them where the outline is, you'll have an ugly extra/double bolded border. If you dont want that you have to specify borders for every TD element that is not outlined by the border property of the <TABLE> element. I know that telerik knows of this bug since when you copy paste a table from MS Word the editor makes tables in the same fashion (they remove some left,right,top borders...). Is this gonna be fixed or should I template my tables for exporting like that?

    EDIT (how i came to this problem):

    The problem comes when you have custom tags in the editor (e.g. <CustomerTable type=7>). I replace these tags with live data from DB and generate a document like this:

    editor_doc.Content = myTemplate.GenerateDocFromTemplate(customerID, editor_doc.Content)
    editor_doc.ExportToPdf()

    I run a GenerateDocFromTemplate method which just replaces all of the custom TAGs so you're not using the "copy-paste" method  described above. That's where the problem comes.

    This really should be documented.
  2. Ianko
    Admin
    Ianko avatar
    1932 posts

    Posted 15 Jan 2014 Link to this post

    Hello Luka,

    The Export To PDF functionality comes from a third-party library that has some known limitations that are already documented in this help article.

    We are aware that some of our users would need more advanced functionality and this is why we provide an approach to set a custom or another third-party library for this feature

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top