{
final XmlWriter xmlWriter = getXmlWriter();
final PageDefinition pageDefinition = getReport().getPageDefinition();
if (pageDefinition instanceof SimplePageDefinition)
{
final SimplePageDefinition spdef = (SimplePageDefinition) pageDefinition;
final AttributeList attr = new AttributeList();
attr.setAttribute(ExtParserModule.NAMESPACE, "width",
String.valueOf(spdef.getPageCountHorizontal()));
attr.setAttribute(ExtParserModule.NAMESPACE, "height",
String.valueOf(spdef.getPageCountVertical()));
xmlWriter.writeTag(ExtParserModule.NAMESPACE,
ReportConfigWriter.SIMPLE_PAGE_DEFINITION_TAG, attr, XmlWriterSupport.OPEN);
final AttributeList attributes = buildPageFormatProperties(spdef.getPageFormat(0));
xmlWriter.writeTag(ExtParserModule.NAMESPACE,
ReportConfigWriter.PAGE_TAG, attributes, XmlWriterSupport.CLOSE);
xmlWriter.writeCloseTag();
}
else