Apparently these settings can be changed for ods spreadsheet documents, but with odt only certain parameters can be changed:
StyleMasterPageElement defaultPage = templateDocument.getOfficeMasterStyles().getMasterPage("Default");
String pageLayoutName = defaultPage.getStylePageLayoutNameAttribute();
OdfStylePageLayout pageLayoutStyle = defaultPage.getAutomaticStyles().getPageLayout(pageLayoutName);
TextProperties textProperties = TextProperties.getOrCreateTextProperties(pageLayoutStyle);
textProperties.setFontStyle(StyleTypeDefinitions.FontStyle.BOLD);
how to for instance set the Page Orientation? I cannot find any reference in the API for odt documents.
You can change page size and margins with PageLayoutProperties class.
About the page orientation, you can switch the width and height of the page to get the landscape orientation, but I am not sure if it is the right way to do it.