Hello,
I’m using aspose.words Java and I create a word document through DocumentBuilder.
I have a piece of code that wants to change margins on the second page via section, here it is extract:
m_DocumentBuilder.insertBreak(BreakType.SECTION_BREAK_CONTINUOUS);
Section docSection = m_DocumentBuilder.getCurrentSection();
docSection.getPageSetup().SetTopMargin(72);
docSection.getPageSetup().SetBottomMargin(72);
docSection.getPageSetup().SetLeftMargin(72);
docSection.getPageSetup().SetRightMargin(72);
The created document is correct if it is created as .docx format, it is not if created as .odt.
Is there another solution that works fine in both cases?
The constraint is that I don’t want to insert a real page break, but only give information that the new section should bring new margins. Attached a zip with the two resulting documents for same code.
DocbuilderTest.zip (8.6 KB)
Thank you.
Best regards