Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Jun 09, 2023 10:15 am

Hello,
Has anyone ever modified the text formatting of an array, when it is in an RTF string added via the AppendRTF function.

Hy,

In my case, "my RTF string" includes 3 elements:
- a line with the text "BEFORE
- an array
- another line with "AFTER" text

I do an AppendRTF(my RTF string).
Then the "Paragraphs.Count" function returns 2.
Then, when I go through the "Paragraphs", I only find the paragraphs with the "BEFORE" and "AFTER" texts. I can then customize the layout of these texts.

But I can't find the array!

However, the array is present in the result file.
So how do I find the array and assign it a customized text layout?

Thanks for your help

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Mon Jun 12, 2023 3:53 am

Hi,

Thanks for your inquiry.
Could you please share us with your full code and the effect you want? This can effectively help us better understand your requirement and find a solution for you. You can send them to us via email ([email protected]) or attach them here. Thanks for your assistance and understanding.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Mon Jun 12, 2023 12:19 pm

Thank you for your reply.
I have sent you an email.
Regards
William

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Tue Jun 13, 2023 2:31 am

Hi William,

Thanks for your sharing.
After debugging, we have discovered that the RTF you added is being parsed into three parts: a paragraph, a table, and another paragraph. Both the table and the paragraph are child objects of the body, as shown in the screenshot attached via email.

To retrieve the information you need, we suggest that you access the second child object and convert it to a table object. This will allow you to manipulate the table and obtain the desired attributes.

Please let us know if you require any further assistance.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Doc

cron