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.

Mon Jul 09, 2018 6:54 am

I found a problem when I try to apply FirstLineIndent style to a paragraph.
When the "Nomal" builtinStyle of the template doc file is not 0f,forexample, 30f, then add a new paragraph,
I can't set FirstLineIndent style to 0f or 60f. It does't work.

But if "Nomal" builtinStyle of the template doc file is 0f , It works well.

Document doc = new Document();
doc.LoadFromFile("Sample.docx");

Section s = doc.AddSection();
Paragraph Paras = s.AddParagraph();
Paras.AppendText("News Line Sample");
Paras.Format.FirstLineIndent = 0F;

doc.SaveToFile("result.docx", FileFormat.Docx);
System.Diagnostics.Process.Start("result.docx");

lilibing
 
Posts: 1
Joined: Mon Jul 09, 2018 6:37 am

Mon Jul 09, 2018 8:22 am

Dear lilibing,

Thanks for your inquiry.
I have noticed the issue and posted it to our Dev team. Once there is any update, we will let you know.
Sorry for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Jul 25, 2018 9:24 am

Dear lilibing,

Thanks for your waiting.
Now the issue has been fixed in Spire.Doc Pack(hot fix) Version:6.7.13.
In addition, please use following code to set the indent.
Code: Select all
Paras.Format.SetFirstLineIndent(0);

Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc

cron