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 Apr 15, 2016 1:51 pm

Hi

I've the following situation:

1. The users are using a TinyMCE-Editor in my MVC-website. The entered HTML-Code should be transfer to a DOCX. The transfer wirth AppendHTML(myTinyMCEtext) is working, but it's not pissible to transfer page breaks into the created docx.

2. My sample code:

Code: Select all
par = s.AddParagraph();
string myTinyMCEtextFromEditor ="<p><span style='color: #ff00ff;'>PAGE1</span><!-- pagebreak -->PAGE2<!-- pagebreak --><b>PAGE3</b></p>";
string myTinyMCEtext = myTinyMCEtextFromEditor.Replace("<!-- pagebreak -->", "<br clear=all style='mso-special-character:line-break;page-break-before:always'>");
par.AppendHTML(myTinyMCEtext);


3. This code should create 3 pages. But spire.doc creates only one page.

If I'm creating a sample HTML page with the same code (
Code: Select all
<p><span style='color: #ff00ff;'>PAGE1</span><br clear=all style='mso-special-character:line-break;page-break-before:always'>PAGE2<br clear=all style='mso-special-character:line-break;page-break-before:always'><b>PAGE3</b></p>

) and than I'm opening MS Word and coping/pasting the selected HTML from browser to Word, than Word accepts the page breaks, I'm getting 3 pages.

Why is the iterpretation of "<br clear=all style='mso-special-character:line-break;page-break-before:always'>" wrong in spire.doc AppendHTML?
Any ideas for a solution or workaround?

Thanks

Stefan

kaifer
 
Posts: 1
Joined: Wed Oct 28, 2015 12:19 pm

Mon Apr 18, 2016 6:22 am

Hi,

Thanks for your posting.
I have reproduced your issue and forwarded it to our dev team. We will inform you when it is resolved.

Best Regards,
Amy
E-iceblue support team
User avatar

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

Fri May 06, 2016 7:39 am

Hi,

Thanks for waiting.
The issue has been resolved.
Welcome to download and test Spire.Doc Pack Version:5.7.

Best Regards,
Amy
E-iceblue support team
User avatar

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

Tue May 10, 2016 6:35 am

Hi,

How did Spire.Doc Pack Version:5.7 work?
Thanks for your feedback in advance.

Best Regards,
Amy
E-iceblue support team
User avatar

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

Return to Spire.Doc