PageComponentImpl page = createInstance(PageComponentImpl.class);
page.setSize(pageSize, landscape);
page.setTag(PrintTemplate.PAGE);
MapComponentImpl map = createMap();
ImageComponentImpl northarrow = createArrow();
ScaleBarComponentImpl bar = createBar();
LabelComponentImpl title = createTitle();
LegendComponentImpl legend = new LegendComponentImpl();
legend.setTag(PrintTemplate.LEGEND);
map.addComponent(bar);