writer.append("<br style='page-break-after:always;'/>");
if (isFirst) { isFirst = false; } else { writer.append("<br style='page-break-after:always;'/>"); }
    public void encodeBegin(FacesContext context) throws IOException {        if (!isRendered()) {            return;        }        ResponseWriter writer = context.getResponseWriter();        Calendar begin = getDateArgument("begin");        Calendar end = getDateArgument("end");        if (begin == null || end == null) {            writer.write("<!-- begin and end dates must be specified -->");        } else if (!end.after(begin)) {            writer.write("<!-- end date must be after begin date -->");        } else {            if (begin.get(Calendar.MONTH) == end.get(Calendar.MONTH)) {                encodeMonthTable(writer, context, "MONTH" + begin.get(Calendar.MONTH), begin, end);            } else {                for (; begin.before(end); setToFirstDayOfNextMonth(begin)) {                    Calendar endPeriod = Calendar.getInstance();                    endPeriod.setTime(begin.getTime());                    endPeriod.set(Calendar.DAY_OF_MONTH, begin.getActualMaximum(Calendar.DAY_OF_MONTH));                    if (endPeriod.after(end)) {                        endPeriod.setTime(end.getTime());                    }                    writer.append("<br style='page-break-after:always;'/>");                                        encodeMonthTable(writer, context, "MONTH" + begin.get(Calendar.MONTH), begin,                            endPeriod);                }            }        }    }