We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Paragraph borders

Hi,
I have a Table cell with some paragraphs inside.

for (int i = 0; i < crfQuestion.Answers[0].MaxLength/200; i++)
{
    var ansPar1 = table[01].AddParagraph();
    ansPar1.ParagraphFormat.Borders..Bottom.BorderType = BorderStyle.Single;
    ansPar1.AppendText(""DocStyles.answerText);
}
answerParagraph = table[01].AddParagraph();
answerParagraph.ParagraphFormat.Borders.Bottom.BorderType = BorderStyle.Single;

I would expect that each paragraph has a Bottom border border, instead only the last one has it.
In the doc attached, in the 3rd page first table, (Study Protocol) I achieved putting a border each paragraph directly in Word, using the "Internal Borders" menu in the Border ribbon button.
There is a way to programmatically do this? Or there is a workaround?

   Thanks in advance

     Andrea Perazzolo


Attachment: report_(11)_859e73c4.zip

3 Replies

SK Sathish K Syncfusion Team September 22, 2015 06:04 AM UTC

Hi Andrea,

Thank you for contacting Syncfusion support.

Kindly define horizontal and vertical borders for the paragraphs in order to get bottom border for each and every paragraphs placed inside the table cell. Please refer to the following code example which illustrates the same.

Code example:
WParagraph para = table.Rows[0].Cells[0].AddParagraph() as WParagraph;

para.ParagraphFormat.Borders.Horizontal.BorderType = BorderStyle.Single;
para.ParagraphFormat.Borders.Vertical.BorderType = BorderStyle.Single;

Regards,
Sathish



AP Andrea Perazzolo September 22, 2015 07:16 AM UTC

Thank you for the reply.
It works in the docx generation, but unfortunately it is not preserved in the PDF conversion of the Word Document.
Do wou have a Workaround?

    Thanks in advance

     Andrea Perazzolo


SK Sathish K Syncfusion Team September 23, 2015 05:51 AM UTC

Hi Andrea,

A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,
Sathish


Loader.
Live Chat Icon For mobile
Up arrow icon