// load a document
DocumentHandle handle = loadDocument(xMSF, settings[0]);
// first size
Rectangle rect1 = handle.getDocumentPosSize();
// resize
handle.resizeDocument();
// after resize
Rectangle rect2 = handle.getDocumentPosSize();
// disposeManager and start a new office
if (!disconnect()) return;
if (!connect()) return;
// get configuration
settings = getConfigurationAndLoader(xMSF, els[i]);
String newCfg = settings[1];
// load a document
handle = loadDocument(xMSF, settings[0]);
Rectangle newRect = handle.getDocumentPosSize();
// print the settings and window sizes
log.println("----------------------------");
log.println("Initial Config String : " + cfg);
log.println("Config String after restart: " + newCfg);