java - Changing the order of paragraphs not working -


i trying manipulate order of paragraphs in worddocument using docx4j.

p1 p2 t1

should this

p2 t1 p1

the following code nothing

in clipboard paragraphs, should moved are. first delete them document. index index of first paragraph.

for ( p p: clipboard ) {   this.c.wordmlpackage.getmaindocumentpart().getcontent().remove( p); } 

then try reinsert them

for ( p p : clipboard ) {   system.out.println("adding to+"+ index+" " + child.getp());   this.c.wordmlpackage.getmaindocumentpart().getcontent().add( index-1, p ); } 


Comments

Popular posts from this blog

command line - Use qwinsta in PowerShell ISE -

java - Incorrect order of records in M-M relationship in hibernate -

Python website log in: BIG-IP can not find session information in the request -