diff --git a/src/ro/nextreports/engine/exporter/HtmlExporter.java b/src/ro/nextreports/engine/exporter/HtmlExporter.java index beeb950..b9d1e6f 100644 --- a/src/ro/nextreports/engine/exporter/HtmlExporter.java +++ b/src/ro/nextreports/engine/exporter/HtmlExporter.java @@ -340,6 +340,27 @@ private String getStringValue(Object val, String pattern) { return v; } + // even if HTML is not a paged document we need to take care for print page breaks "page-break-before: always" + // tables need to be broken in order to force a page break. + protected void newPage() { + if (!bean.isSubreport()) { + try { + stream.print("\n"); + stream.println("

\n"); + if (bean.getReportLayout().isUseSize()) { + stream.print(""); + } else { + stream.print("
"); + } + if (bean.getReportLayout().isHeaderOnEveryPage()) { + printHeaderBand(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + // private String getRotationStyle(short angle) { // StringBuilder sb = new StringBuilder(); // if (angle == -90) {