Subsurface Two Page Dive Log

55 views
Skip to first unread message

larry6700

unread,
Nov 5, 2022, 11:28:41 AM11/5/22
to Subsurface Divelog
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.  

Gmail im Auftrag von Martin Gröger

unread,
Nov 6, 2022, 12:29:19 AM11/6/22
to subsurfac...@googlegroups.com
hm...


would you share the HTML file and send it to me, so I can have a look at it?
the HTML "browser" used in subsurface is a little "tricky" and doesn't support all HTML commands.
I have done a lot of HTML templates and maybe I find a way to help you....


keep on howling

grey

'larry6700' via Subsurface Divelog <subsurfac...@googlegroups.com> schrieb am Sa., 5. Nov. 2022, 16:28:
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.

Larry

unread,
Nov 6, 2022, 8:46:09 AM11/6/22
to subsurfac...@googlegroups.com, Larry

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";>

&nbsp

Larry's Dive Log

&nbsp &nbsp</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> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

<td style="width:45pt; text-align:right"><b>EOD:

<td style="width:50pt"><p> <u>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

</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>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

</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>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

 

<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>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp </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>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

</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>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

</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> &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp

 

<td style="width:200pt ; text-align:right"> <b>Dive Number:

<td style="width:47pt"> <p style="font-size:20pt"> <u><b> &nbsp {{ 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.

test dive log Nov 6.pdf

Martin Gröger

unread,
Nov 6, 2022, 11:17:54 AM11/6/22
to subsurfac...@googlegroups.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.........……………………………… -->

Larry Bird

unread,
Nov 6, 2022, 4:06:36 PM11/6/22
to subsurfac...@googlegroups.com
Yes I’d like the chart (dive profile) to be on page 2. My paper is an odd size ~5.5” X ~8.5” or if you prefer ~140mm wide X ~215mm tall

Larry

On Nov 6, 2022, at 11:33, Martin Gröger <megr...@gmail.com> wrote:



Martin Gröger

unread,
Nov 7, 2022, 2:15:49 AM11/7/22
to subsurfac...@googlegroups.com

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.........……………………………… -->

lasl

unread,
Nov 7, 2022, 6:15:46 PM11/7/22
to Subsurface Divelog
Hi all,

A little bit on the side of this topic : Grey, you say you've done a lot of subsurface templates... Wouldn't it be great to share them in a "template-gallery" for instance? (if they are not confidential)
If I'm not mistaken, I don't think such a gallery exists...  does it?
in which it seems you have worked two years ago on some stuff for inclusion... what's the status of it?

Even if they are not "nice-and-rounded-finished-products" it always helps to start from something else than a blank page!

@grey & @everyone-else-who'd-like-to-share-templates
I might write some documentation for it if you don't have time to.
I might even host them somewhere on the internet to share them
Just send me whatever you want and I'll see what I can do ! :)

I am also thinking about translating the dive logs template (currents included templates seems only in English... am I right?)
I can't program something in the core app to select the right language automagically but I could at least propose some html translated in French and Spanish.

What do you think about all this ?
---
Louis

Martin Gröger

unread,
Nov 8, 2022, 1:32:31 AM11/8/22
to subsurfac...@googlegroups.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>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp </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>

Martin Gröger

unread,
Nov 8, 2022, 1:50:53 AM11/8/22
to subsurfac...@googlegroups.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,

Larry

unread,
Nov 8, 2022, 7:45:33 PM11/8/22
to subsurfac...@googlegroups.com

That's a great idea!  I can write that code up no problem.  Thanks!

 

Larry

Reply all
Reply to author
Forward
0 new messages