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.
Tue Aug 16, 2022 12:08 pm
How to identify soft line breaks in a paragraph
-

cc_cc_cc_cc
-
- Posts: 4
- Joined: Fri Aug 05, 2022 9:18 am
Wed Aug 17, 2022 9:48 am
Hello cc cc,
Thanks for your inquiry.
You can refer to the following sample code to identify soft line breaks in a paragraph. If you have any further questions when testing your file, to help us have an accurate investigation, please share your testing file with us. You can attach it here or send it to us via email(
[email protected]).
- Code: Select all
Document doc = new Document();
doc.LoadFromFile(@"input.docx");
//get the first paragraph from the first section
Paragraph para1 = doc.Sections[0].Paragraphs[0];
foreach (DocumentObject obj in para1.ChildObjects)
{
if (obj is Break && (obj as Break).BreakType == BreakType.LineBreak)
{
//....
}
}
Sincerely,
Simple
E-iceblue support team
-


Simple.Li
-
- Posts: 248
- Joined: Fri Jul 01, 2022 2:33 am
Thu Aug 18, 2022 2:04 am
Thank you very much.

-

cc_cc_cc_cc
-
- Posts: 4
- Joined: Fri Aug 05, 2022 9:18 am
Fri Aug 19, 2022 6:32 am
Hello cc cc,
Thanks for your reply.
You are welcome. If you have any further questions, please feel free to contact us.
Sincerely,
Simple
E-iceblue support team
-


Simple.Li
-
- Posts: 248
- Joined: Fri Jul 01, 2022 2:33 am