Change the page orientation in middle of doc
问题 I need to set landscape to some pages of a document. I tried this code: SectPr sectionLandscape = objectFactory.createSectPr(); String rsidR = sectionLandscape.getRsidR(); SectPr sectionPortrait = objectFactory.createSectPr(); sectionPortrait.setRsidR(rsidR); sectionPortrait.setRsidSect(rsidR); PgSz landscape = new PgSz(); landscape.setOrient(STPageOrientation.LANDSCAPE); landscape.setH(BigInteger.valueOf(11906)); landscape.setW(BigInteger.valueOf(16383)); sectionLandscape.setPgSz(landscape);