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