I am using ckeditor as my editor. In that I have an option for page break. When I added page break in paragraph and generate word document with ckeditor html, document will have session break with next page instead of page break. I am attaching my input and output document with sample code.
Please use following HTML in the code to get the desired output.
String htmlString = "<p style=\"text-align:justify\"><span style=\"background-color:rgb(255, 255, 255); color:rgb(0, 25, 55); font-family:arial,helvetica,sans-serif; font-size:14px\">Topic sentences are similar to </span><strong>mini thesis statements</strong><span style=\"background-color:rgb(255, 255, 255); color:rgb(0, 25, 55); font-family:arial,helvetica,sans-serif; font-size:14px\">. Like a thesis statement, a topic sentence has a specific main point. Whereas the thesis is the main point of the essay, the topic sentence is the main point of the paragraph. </span></p>\n" +
"\n" +
"<br style=\"page-break-before:always; clear:both\" /><div <span style=\"display:none\"> </span></div>\n" +
"\n" +
"<p style=\"text-align:justify\"><span style=\"background-color:rgb(255, 255, 255); color:rgb(0, 25, 55); font-family:arial,helvetica,sans-serif; font-size:14px\">Like the thesis statement, a topic sentence has a unifying function. But a thesis statement or topic sentence alone doesn’t guarantee unity. An essay is unified if all the paragraphs relate to the thesis, whereas a paragraph is unified if all the sentences relate to the topic sentence. </span><strong>Note:</strong><span style=\"background-color:rgb(255, 255, 255); color:rgb(0, 25, 55); font-family:arial,helvetica,sans-serif; font-size:14px\"> Not all paragraphs need topic sentences. In particular, opening and closing paragraphs, which serve different functions from body paragraphs, generally don’t have topic sentences.</span></p>\n" +
"";