How can I get subsurface to print a two page dive log? I have created my own HTML for my log but when I print it via subsurface the dive profile chart is cut in half. I'd like it on a second page so I inserted a page break but it ignores that and still cuts the chart in half. It I export the HTML then run and print it, it works but it does not display the chart. I'd be happy if I could get subsurface to print two pages, or get the exported HTML to find the chart.
--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/85d325c9-1829-4d6e-8b81-2609e930ee5an%40googlegroups.com.
Wow you are awesome, thanks so much for looking at this! The HTML is below, the pdf is attached. If you use the export HTLM function in Subsurface you can see why I mean that it will give the page breaks but no chart.
Larry
In subsurface 'print to pdf', this code version has the chart, but the page is truncated and there are no page breaks
In exported HTML this has the correct page breaks but no chart
--<!DOCTYPE html>
<html>
<head>
<style>
.diveProfile {
width: 99.5%;
height: 20%;
margin: 0.2% 0% 0.5% 0.5%;
}
p {page-break-after: always;}
div {
margin-left: 8pt;
}
#remarkspara {
width: 100%;
height: 3.5in;
overflow: hidden;
}
hr{height: 1pt;background-color: black;border: none;}
<!-- hr is used for the lines in the remarks table -->
.table1 {
text-align: left;
vertical-align: top;
padding: 0;
}
.table1 td {
vertical-align:middle;
font-size:13pt;
/* .............................font size specified here for table1*/
color:black;
//border: solid blue;
//border-width: 2pt;
padding: 0;
}
<!-- ..............table2 is only for Remarks ……… -->
.table2 {
text-align: left;
vertical-align: top;
padding: 0;}
.table2 td {
vertical-align:top;
/* ............font size specified here for remarks title only, font for remarks is way below*/
font-size:13pt;
//border: solid blue;
//border-width: 2pt;
padding: 0;
}
h4 {font-size: 20pt; margin-top: 0; padding: 0;}
<!-- h4 is only for Larry's Dive Log title -->
</style>
</head>
<!-- …. ... this is required for chart {% for dive in dives %}. -->
{% for dive in dives %}
<!-- ........................Larry's Dive Log title…………………………………………………… -->
<h4> <img style="vertical-align:middle" img src="file:///F:/Documents and Settings/Larry\My Documents/Scuba Diving/Log/Padi 2.jpg"
width="110"
height="35">
<span style="font-weight:bold";>
 
Larry's Dive Log
   </span>
<img style="vertical-align:middle" src="file:///F:/Documents and Settings/Larry\My Documents/Scuba Diving/Log/Scuba.jpg"
width="65"
height="35" >
</h4>
<!-- ...........................- location…………… -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"> <b> Location:
<td style="width:160pt"> <u> {{ dive.location }}
<td style="width:60pt; text-align:right"> <b> Date:
<td style="width:90pt"> <u> {{ dive.date }}
</tr>
</table>
</div>
<br>
<!-- ............... max depth ………………………… -->
<div class="table1">
<table>
<tr>
<td style="width:67pt"><b>Max Depth:
<td style="width:74pt"><p> <u> {{ dive.depth }}
<td style="width:70pt; text-align:right"><b>Altitude:
<td style="width:50pt"><p> <u>                
<td style="width:45pt; text-align:right"><b>EOD:
<td style="width:50pt"><p> <u>               
</tr>
</table>
</div>
<br>
<!-- ...... Air temp ....…………………………………… -->
<div class="table1">
<table>
<tr>
<td style="width:60pt"><b>Air Temp:
<td style="width:79pt"> <p> <u>{{ dive.airTemp }}
<td style="width:75pt; text-align:right"><b>Water temp:
<td style="width:50pt"> <p> <u> {{ dive.waterTemp }}
<td style="width:25pt; text-align:right"><b>Vis:
<td style="width:78pt"> <p> <u>                     
</tr>
</table>
</div>
<br>
<!-- ............. wt used……………………………………………… -->
<div class="table1">
<table>
<tr>
<td style="width:60pt"><b>Wt used:
<td style="width:79pt"> <u> {{ dive.sumWeight }}
<td style="width:70pt; text-align:right"><b>Weather:
<td style="width:50pt"> <p> <u>           
<td style="width:63pt"><b>Ave Depth:
<td style="width:50pt"> <u> {{ dive.meandepth }}
</table>
</div>
</table>
</div>
<br>
<!-- ............................... remarks.........……………………………… -->
<div id="remarkspara">
<div class="table2">
<table>
<tr>
<td style="width:50pt; text-align: left"> <b>Remarks:
<!-- .................remarks font size is below............... -->
<td style="width:320pt; text-align: left; line-height:0.30in;"><p style="font-size:13pt"> <u> {{ dive.notes|safe }}
<hr><br>
<hr><br>
<hr><br>
<hr><br>
<hr><br>
<hr><br>
<hr><br>
<hr><br>
</table>
</div>
</div>
<br>
<!-- ................... Buddies………………………………………. -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"> <b>Buddies:
<td style="width:326pt"> <u> {{ dive.buddy }}
</table>
</div>
<br>
<!-- .................…………...............…Time in ……………………. -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"><b>Time in:</td>
<td style="width:79pt"> <u>{{ dive.time }} </td>
<td style="width:60pt; text-align:right"><b>Time Out: </td>
<td style="width:78pt"><p> <u>                      </td>
<td style="width:60pt; text-align:right"><b>ABT: </td>
<td style="width:78pt"> <u> {{ dive.duration }} </td>
</table>
</div>
<br>
<!-- .................…………...............…Air in ……………………. -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"> <b>Air in:</td>
<td style="width:79pt"> <u> {{ dive.startPressure }} </td>
<td style="width:200pt; text-align:right" > <b>Previously logged hours: </td>
<td style="width:47pt"> <p> <u>             
</tr>
</table>
</div>
<br>
<!-- .............…… Air out …………………………. -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"> <b>Air Out: </td>
<td style="width:79pt"> <u> {{ dive.endPressure }} </td>
<td style="width:200pt; text-align:right"> <b>Total logged hours to date: </td>
<td style="width:47pt"> <p> <u>             
</tr>
</table>
</div>
<br>
<!-- ............………Air used………………. -->
<div class="table1">
<table>
<tr>
<td style="width:60pt"><b> Air used: </td>
<td style="width:74pt"> <p> <u>                      
<td style="width:200pt ; text-align:right"> <b>Dive Number:
<td style="width:47pt"> <p style="font-size:20pt"> <u><b>   {{ dive.number }}
</table>
</div>
<style>
p {page-break-after: always;}
</style>
<p> ............... chart ………………………</p>
<div class="diveProfile" id="dive_{{ dive.id }}">
</div>
<p> ............... end chart ………………………</p>
<button onclick = "myFunction()">Print this page</button>
<script>
function myFunction() {
window.print();
}
</script>
{% endfor %}
</body>
</html>
--
You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/efXaty-CFmw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CAAc4xULwptT0zRGxTBRTm%3DATDvoF-gJsM6WZNejdipifLzWP%3DA%40mail.gmail.com.
Hm…
ok – in your pdf there is a Chart in my eyes 😉
if I get you right you want the chart to be on page 2 – correct?
which paper-size you are useing? Letter? Sorry – I am in the metric System – but I get it
Keep on howling
grey
/* ............................font size specified here for table1*/
<!-- .............. max depth ………………………… -->
<!-- .............................. remarks.........……………………………… -->
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/00f101d8f1e6%241d041ad0%24570c5070%24%40bmts.com.
On Nov 6, 2022, at 11:33, Martin Gröger <megr...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/4044E282-52EB-441E-A336-30EDF4CADD93%40hxcore.ol.
Hi Larry
I think you discovered a nice issue 😉
I never tried to generate 2 sides of a log but more tried to avoid it – BUT…..
even if I define a template with a lenght of >3000px subsurface generates only one page – as long as you have just one dive selected for printing. IF there is a second dive selected, the printing engine generates more than one page (no matter if page-break is defined or not) – strange…….
dirk, any ideas?
/* ...........................font size specified here for table1*/
color:black;
//border: solid blue;
//border-width: 2pt;
padding: 0;
}
<!-- ..............table2 is only for Remarks ……… -->
.table2 {
text-align: left;
vertical-align: top;
padding: 0;}
.table2 td {
vertical-align:top;
/* ...........font size specified here for remarks title only, font for remarks is way below*/
<!-- ............................. remarks.........……………………………… -->
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CC950198-2E2B-4EE1-92E9-1F440C933EC8%40bmts.com.
Hi Larry
What I found out in the meantime:
subsurface refuses to print a 2sided divelog with only one dive– so far so bad
but….
I think we can „overrule“ this by useing 2 templates – the first with your table, notes and that stuff and a second with the profile.
Could that be a way for you?
greez
martin
Von: 'Larry Bird' via Subsurface Divelog
Gesendet: Sonntag, 6. November 2022 22:06
An: subsurfac...@googlegroups.com
<!-- ............. max depth ………………………… -->
<!-- .................. Buddies………………………………………. -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"> <b>Buddies:
<td style="width:326pt"> <u> {{ dive.buddy }}
</table>
</div>
<br>
<!-- .................…………...............…Time in ……………………. -->
<div class="table1">
<table>
<tr>
<td style="width:50pt"><b>Time in:</td>
<td style="width:79pt"> <u>{{ dive.time }} </td>
<td style="width:60pt; text-align:right"><b>Time Out: </td>
<td style="width:78pt"><p> <u>                      </td>
<td style="width:60pt; text-align:right"><b>ABT: </td>
<td style="width:78pt"> <u> {{ dive.duration }} </td>
</table>
</div>
<br>
<!-- ................…………...............…Air in ……………………. -->
<p> .............. chart ………………………</p>
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CC950198-2E2B-4EE1-92E9-1F440C933EC8%40bmts.com.
Hi louis
the idea of a template galery is not new to me – so feel free to get some Webspace, a Domain etc…
BUT:
most of the tempate I created are very hardcoded to my personal needs e.g. paper size, font size, number of cylinders I use (up to 2021 I was diving tec backmount but changed to sidemount in 2022), language (sorry, most of my own templates are in german).
so in my case it would be a lot of work to get these templates „liquid“ to work with different page sizes/font sizes, numbers of cylinders, language (e.g. some terms used in english are much shorter than in german)…..
I have to think it over…..
Keep on howling
grey
Von: lasl
Gesendet: Dienstag, 8. November 2022 00:15
An: Subsurface Divelog
Betreff: Re: Subsurface Two Page Dive Log
Hi all,
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/4eb524bb-b650-4726-8b12-164ca5199db3n%40googlegroups.com.
That's a great idea! I can write that code up no problem. Thanks!
Larry
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/B31B3538-890E-43EB-AFAE-CB3219FD5381%40hxcore.ol.