Home > Back-end >  Java freemarker generated word and page breaks where automatically added a line of what this problem
Java freemarker generated word and page breaks where automatically added a line of what this problem

Time:09-27

Word is generated by a freemarker the place has a page break when they will be moving down a line that is why
The normal style should be

And after I replace the template it is much more a line

I put the two files are save as XML relative position should be open to view the label after they are the same as

Page breaks in XML is that









This style is gives me a headache problem, is there a big encountered similar problems, solving!
Sick!!!!!!!!!!

CodePudding user response:

Ha ha, I also met before, when paging is paging code & lt; W: P> , don't p tags, direct & lt; W: br w: type="page"/& gt; As if written so, it is the inside of the p, you just look for it

CodePudding user response:

Well, I'll try to,

CodePudding user response:

Just use the Free Spire. Doc for the effect of Java Settings page breaks, did not appear this problem, you said effect OK
 import com. The Spire. Doc. *; 
The import com. Spire. Doc. Documents. BreakType;

Public class AddPagebreak {
Public static void main (String [] args) {
Document doc=new Document (" test. Docx ");
Section of the SEC=doc. GetSections (). The get (0);
The SEC. GetParagraphs (). The get (3) appendBreak (BreakType. Page_Break);
Doc. SaveToFile (" result. Docx, FileFormat. Docx_2010);
}
}

CodePudding user response:

You this is with Jacob

CodePudding user response:

Removed, the go out on my side
  • Related