Problem - Export to PDF - Color border cell

3 posts, 0 answers
  1. william
    william avatar
    6 posts
    Member since:
    Dec 2016

    Posted 17 May Link to this post


    When exporting to PDF is not respecting cell color #FF0000(RED), it is always turning black.

    Result Attach


    HtmlFormatProvider prov = new HtmlFormatProvider();
    RadFlowDocument document = prov.Import(@"<table><tbody><td style="""">NO-BORDER-COLOR</td><td style=""border:5px;border-style:solid;border-color:#FF0000;"">WITH-BORDER-COLOR-RED</td></tr></tbody></table>");
    var provider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
    var ouput = provider.Export(document);
    File.WriteAllBytes(@"D:\b.pdf", ouput);


  2. Peshito
    Peshito avatar
    524 posts

    Posted 22 May Link to this post


    Thank you for providing the code sample. The border-color property is not supported by the table cell. There is a feedback item you could vote for and subscribe to in order to raise its priority. In the meantime use the shorthand property for applying the color of the cell. For instance:
    RadFlowDocument document = prov.Import(@"<table><tbody><td style="""">NO-BORDER-COLOR</td><td style="" border: 5px solid red;"">WITH-BORDER-COLOR-RED</td></tr></tbody></table>");
    Hope this helps.

    Telerik by Progress

  3. william
    william avatar
    6 posts
    Member since:
    Dec 2016

    Posted 25 May in reply to Peshito Link to this post

    Perfect, thanks
Back to Top