diff --git a/printer.cpp b/printer.cpp
index 5b1995501..10942865a 100644
--- a/printer.cpp
+++ b/printer.cpp
@@ -160,7 +160,12 @@ void Printer::print()
divesPerPage = 1; // print each dive in a single page if the attribute is missing or malformed
//TODO: show warning
}
- int Pages = ceil(getTotalWork(printOptions) / (float)divesPerPage);
+ int Pages;
+ if (divesPerPage == 0) {
+ Pages = ceil(webView->page()->mainFrame()->contentsSize().height() / (float)pageSize.height());
+ } else {
+ Pages = ceil(getTotalWork(printOptions) / (float)divesPerPage);
+ }
render(Pages);
}
diff --git a/printing_templates/custom.html b/printing_templates/Custom.html
similarity index 100%
rename from printing_templates/custom.html
rename to printing_templates/Custom.html
diff --git a/printing_templates/Flowlayout.html b/printing_templates/Flowlayout.html
new file mode 100644
index 000000000..a3f7951d9
--- /dev/null
+++ b/printing_templates/Flowlayout.html
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+{% block main_rows %}
+ {% for dive in dives %}
+
+
+
+
+
+
+
+ Dive No.
+ |
+
+ {{ dive.number }}
+ |
+
+
+
+ Date
+ |
+ {{ dive.date }}
+ |
+
+
+
+ Location
+ |
+
+ {{ dive.location }}
+ |
+
+
+
+ Max depth
+ |
+
+ {{ dive.depth }}
+ |
+
+
+
+ Duration
+ |
+
+ {{ dive.duration }}
+ |
+
+
+
+
+
+ Time.
+ |
+
+ {{ dive.time }}
+ |
+
+
+
+ Air Temp.
+ |
+ {{ dive.airTemp }}
+ |
+
+
+
+ Water Temp.
+ |
+
+ {{ dive.waterTemp }}
+ |
+
+
+
+ Buddy
+ |
+
+ {{ dive.buddy }}
+ |
+
+
+
+ Dive Master
+ |
+
+ {{ dive.divemaster }}
+ |
+
+
+
+
+
+
+
+ Notes
+ |
+
+
+ |
+
+ {{ dive.notes }}
+
+ |
+
+
+
+
+
+
+
+ {% endfor %}
+{% endblock %}
+
+
+
diff --git a/printing_templates/one_dive.html b/printing_templates/One Dive.html
similarity index 100%
rename from printing_templates/one_dive.html
rename to printing_templates/One Dive.html
diff --git a/printing_templates/Table.html b/printing_templates/Table.html
new file mode 100644
index 000000000..c97267405
--- /dev/null
+++ b/printing_templates/Table.html
@@ -0,0 +1,83 @@
+
+
+
+
+
+