This is a migrated thread and some comments may be shown as answers.

Problem - Export to PDF - Color border cell

2 Answers 50 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
william
Top achievements
Rank 1
william asked on 17 May 2017, 06:37 PM

Hello,

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

Result Attach

Code:

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 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 22 May 2017, 11:49 AM
Hi,

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.

Regards,
Peshito
Telerik by Progress

0
william
Top achievements
Rank 1
answered on 25 May 2017, 12:14 PM
Perfect, thanks
Tags
WordsProcessing
Asked by
william
Top achievements
Rank 1
Answers by
Peshito
Telerik team
william
Top achievements
Rank 1
Share this question
or