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 Nov 05, 2012 5:20 pm

Hello,

I've got some trouble with the mehtod "paragraph.AppendHTML".
My HTML-String:
Code: Select all
Line 1<br><b>Line 2</b><br><i>Line 3</i><br><u>Line 4</u><br><br>Bulletpoints:<br><ul><li>safdsdfs</li><li>sdfsdfsdfsdfsdf</li><li>sdfsfsdfsdfsdfsdfsdf</li></ul><p>Numberlist:</p><ol><li>test 1</li><li>test 2</li><li>test 3</li></ol><p align="center">CENTER<br></p>


Output ends after Line 4.
Image
Image

Whats wrong?

Greetings from Germany

benjamin.gast
 
Posts: 2
Joined: Thu Mar 29, 2012 2:53 pm

Tue Nov 06, 2012 4:52 am

Hi benjamin.gast,

Thanks for your inquiry.
We have done a test, but we don't reproduce your problem. We use the dlls of Spire.Doc Pack (Hot Fix) Version:4.5.9 from the link http://www.e-iceblue.com/Download/download-word-for-net-now.html to test below code. If we miss something, please tell us.
Code: Select all
Document document = new Document();
 string htmlText=@"Line 1<br/><b>Line 2</b><br/><i>Line 3</i><br/><u>Line 4</u><br/><br/>Bulletpoints:<br/><ul><li>safdsdfs</li><li>sdfsdfsdfsdfsdf</li><li>sdfsfsdfsdfsdfsdfsdf</li></ul><p>Numberlist:</p><ol><li>test 1</li><li>test 2</li><li>test 3</li></ol><p align=""center"">CENTER<br/></p>";
document.AddSection().AddParagraph().AppendHTML(htmlText);
document.SaveToFile("sample.doc",FileFormat.Doc);


Best regards,
Amy
E-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue Nov 06, 2012 8:11 am

Thanks amy,

your code helped me to fix my problem!

benjamin.gast
 
Posts: 2
Joined: Thu Mar 29, 2012 2:53 pm

Thu Nov 29, 2012 1:23 am

Hello,

You are welcome.
If you encounter any problem, please feel free to contact us.

Best regards,
Amy
E-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc