Printing Template

145 views
Skip to first unread message

Grey Wolf

unread,
Aug 4, 2020, 4:44:52 AM8/4/20
to Subsurface Divelog
hi there

I'm just created a printing template fitting to subbooks - as far as good and works great at the moment - but I can't find any solution to get the surface time in the template. this value also doesn't show up in the "grantlee export variables".
Is there a way to manage that or is the surface time calculated on the fly?

I also found out, that the tank values ( as mentioned in the grantlee - cylinders0-7) are not working that way ;-)


keep on howling

Grey

anderson...@gmail.com

unread,
Aug 4, 2020, 4:54:08 PM8/4/20
to Subsurface Divelog
Information -> Interval

Looks to be calculated on-the-fly (but also curious how to access it if it's not)

For cylinders, have you tried:

dive.cylinders
dive.cylinder[0-7]

notice it's not "dive.cylinders[0-7]"

Would like to see what you come up with as far as layout for your template if you care to share somewhere!

-Matthew

Grey Wolf

unread,
Aug 4, 2020, 5:11:26 PM8/4/20
to subsurfac...@googlegroups.com
hi  matthew

hm... I think I give "dive.cylinders[0-7]" a try (don't now by now, if I tried that).
and I'd love to share that template - but at first I have to re-translate it to english, ' cause I wrote it in german 😉
It is made liquid and should fit the most paper-sizes, but was created for sub-books.

martin

--
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/ae8d1383-a64c-4385-a5d8-c01eb465b7c1n%40googlegroups.com.

Grey Wolf

unread,
Aug 5, 2020, 1:45:56 AM8/5/20
to Subsurface Divelog
hi again

so - I tried all versions of
{{dive.cylinder}}
(with and without numbers, upper- and lower case) but with no result.

IF you use just one gas
{{ dive.gas}}
returns the description of the first used tank and you can work with
{{ dive.startPressure}}/{{ dive.endPressure}}

when using 2 or more gases, the
{{ dive.gas}}

returns the used gases, but by operating with
{{ dive.startPressure}}/{{ dive.endPressure}}
to get the pressure-values, you end in no-mans-land.

unsatisfying......

keep on howling

Grey

Grey Wolf

unread,
Aug 5, 2020, 2:07:15 AM8/5/20
to Subsurface Divelog
hi matthew

just posted the (hopefully complete re-translated) template 

@dirk

I know, it makes a little work and isn't asked often, but there is a download-section at the subsurface website. Do you think it would make sense to add a download-section for printing templates?
subbook_en.html

Miika Turkia

unread,
Aug 5, 2020, 4:48:37 AM8/5/20
to Subsurface Divelog
I took a quick look at the cylinder stuff. If you have multiple cylinders, you can refer to each cylinder using format:

dive.cylinders.0

With my brief test it seems that there might be a bug somewhere as I got only 0 liters starting and ending pressure for the first cylinder, but second cylinder (.1) showed correct data. I have never played with the printing templates, so don't really know how these work, but you can take a look at:


Seems also that you can access the data within a cylinder object individually using the following format (this one is accessing the second cylinder)

dive.cylinderObjects.1.startPressure


HTH

Grey Wolf

unread,
Aug 5, 2020, 5:42:54 AM8/5/20
to subsurfac...@googlegroups.com
hi miika

thanks for the link and the explanation - gonna start with testing as soon as I'm back from work

keep on howling

Grey

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

Grey Wolf

unread,
Aug 6, 2020, 5:00:58 AM8/6/20
to subsurfac...@googlegroups.com
hi miika

I just tested a little bit with that infos.......

{{dive.cylinders.0}}
{{dive.cylinderObjects.0.description}} 
{{dive.cylinderObjects.0.startPressure}}  
{{dive.cylinderObjects.0.endPressure}} 
{{dive.cylinderObjects.0.gasMix}} 
{{dive.cylinders.1}} 
{{dive.cylinderObjects.1.description}} 
{{dive.cylinderObjects.1.startPressure}} 
{{dive.cylinderObjects.1.endPressure}} 
{{dive.cylinderObjects.1.gasMix}} 
give to me (look screenshot)
screen1.jpg
seem to work the way I want it (even with the cylinder0) - so with that info I can go on ;-)

for better understanding, what I'm working on:

one printing template (2dives/page) - just a "qick'n'dirty" overview
one printing template (1dive/page) - for rec-dives, with the main informations of the dive an the profile
and
one printing template (1dive/page) - for tec dives, with extended information of the dive, used gases, SAC, OTU, CNS, profile,...

that's what leads me to the next point: the render-quality of the profile (in printing) is one of the worst things I've seen - but at the moment I have got no clue how to change that. On a webserver I could install image-magic or something to get the image right, but on a client-machine I have no idea. Is there some hidden "render-intent" or similar? But if not, we have to take that as it is :-[

keep on howling

Grey

--

Lubomir I. Ivanov

unread,
Aug 6, 2020, 8:24:57 AM8/6/20
to Subsurface Divelog
hello,


> that's what leads me to the next point: the render-quality of the profile (in printing) is one of the worst things I've seen - but at the moment I have got no clue how to change that. On a webserver I could install image-magic or something to get the image right, but on a client-machine I have no idea. Is there some hidden "render-intent" or similar? But if not, we have to take that as it is :-[

with respect to render quality of the dive profile print, please answer these questions / requests:

- what is your operating system?
- what is your version of Subsurface (see Help -> About)?
- are you observing the bad quality when printing to PDF, hard-copy or both?
- what page layout of the print are you using size (e.g. A4) and what is the DPI?

attached is a screenshot of what i see from Subsurface 4.9.4, on Windows 10, A4 / high resolution settings and arguably the quality is quite crisp:





lubomir
--

Message has been deleted

Grey Wolf

unread,
Aug 7, 2020, 1:00:17 AM8/7/20
to subsurfac...@googlegroups.com
hi lubomir

first of all I would like to apologize. my post about the printing quality shouldn' be unfriendly - sorry for that (maybe its, 'cause english isn't my first language, maybe its,' cause I'm trained printer, maybe both).

attached you find 2 pdf's and a screenshot as explanation what I'm talking about
screen.jpg

to answer your questions correct:

- what is your operating system?
Windows10 Home 2004, build 19041.388

- what is your version of Subsurface (see Help -> About)?
4.9.6

- are you observing the bad quality when printing to PDF, hard-copy or both?
both

- what page layout of the print are you using size (e.g. A4) and what is the DPI?  
the correct page-size is in printing is 95 x 172 mm (portrait) 600dpi/85lpi

I already know, that the size I'm using, is _a little bit_ small, but as you can see the blurring also comes up in A4.

It is perfect clear to me, that all of you are busy and you are doing subsurface in your spare-time and I'm sorry I can't help, 'cause coding isn't my part. HTML, CSS or PHP - no prob..

keep on howling

grey

--
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.
Subbook_A4.pdf
Subbook_original.pdf
screen.jpg

Robert Helling

unread,
Aug 7, 2020, 1:54:39 AM8/7/20
to subsurfac...@googlegroups.com
Hi,


On 6. Aug 2020, at 11:00, Grey Wolf <megr...@gmail.com> wrote:

that's what leads me to the next point: the render-quality of the profile (in printing) is one of the worst things I've seen - but at the moment I have got no clue how to change that. On a webserver I could install image-magic or something to get the image right, but on a client-machine I have no idea. Is there some hidden "render-intent" or similar?

is is probably cause by how the profile is generated: What you see is the screen image resolution. To print, we internally render the profile as it would appear on the screen (with some things left out that don’t make sense on paper like the inbox). Then we take a bitmap of that rendering and print it as an image. The printed image is thus not a vector graphic (like the box you mark as clear) but an image at somewhat limited resolution.

Best
Robert
signature.asc

Grey Wolf

unread,
Aug 7, 2020, 3:51:53 AM8/7/20
to subsurfac...@googlegroups.com
hi robert

thanks for your explanation. thats exactly what I thought and I'm afraid there is no easy way to change that (especially when I think of different  operating systems). Screen rendered bitmaps always look like that in printing - that*s the way it is. by now I'm far away to start an discussion like "but before the profile is rendered to a bitmap it was a vector graphic" - that's nonsense. 
on the one hand it's a pity (especially in tec-dives) that probably the information of a critical descent/ascent maybe is not so recognizable by the color at  first glance but on the other hand a experienced, thinking diver sees it in the run of the curve - not the color.

At last I have just one little question: would it be ok to publish printing templates on my own website (of course for free)? If so, I think I would need a little help where to put the templates on a mac or under linux (my mac-times ended up with OS9.2 and I'm a bit uncertain in linux) - just to get the right path for the templates.

keep on howling

grey

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

Lubomir I. Ivanov

unread,
Aug 7, 2020, 8:26:25 AM8/7/20
to subsurfac...@googlegroups.com
On Fri, 7 Aug 2020 at 10:51, Grey Wolf <megr...@gmail.com> wrote:
>
> thanks for your explanation. thats exactly what I thought and I'm afraid there is no easy way to change that (especially when I think of different operating systems). Screen rendered bitmaps always look like that in printing - that*s the way it is. by now I'm far away to start an discussion like "but before the profile is rendered to a bitmap it was a vector graphic" - that's nonsense.
> on the one hand it's a pity (especially in tec-dives) that probably the information of a critical descent/ascent maybe is not so recognizable by the color at first glance but on the other hand a experienced, thinking diver sees it in the run of the curve - not the color.
>

for your markings with red:
- "blurred", i remember some sort of a limitation around how we were
rending some of the lines, including depth and temperature. maybe
there is a chance this can be fixed in newer Qt (the framework that we
use) or maybe it was fixable in older Qt, but we didn't know how.
on the graph itself you can see that some of our lines like the white
grid and the text are in vector, but the rest is rasterized. (see my
attachment)
so i guess the question is how to not rasterize parts of the profile.

- "clear" this is rendered outside of the profile using HTML. as
Robert explained we are doing some special handling to try to render
the profile.

>
> At last I have just one little question: would it be ok to publish printing templates on my own website (of course for free)? If so, I think I would need a little help where to put the templates on a mac or under linux (my mac-times ended up with OS9.2 and I'm a bit uncertain in linux) - just to get the right path for the templates.
>

you can certainly publish your own templates on your website.

lubomir
--
subsurface_raster_vs_vector.png

Lubomir I. Ivanov

unread,
Aug 7, 2020, 8:37:49 AM8/7/20
to subsurfac...@googlegroups.com
On Fri, 7 Aug 2020 at 15:25, Lubomir I. Ivanov <neol...@gmail.com> wrote:
>
> there is a chance this can be fixed in newer Qt (the framework that we
> use) or maybe it was fixable in older Qt, but we didn't know how.
> on the graph itself you can see that some of our lines like the white
> grid and the text are in vector, but the rest is rasterized. (see my
> attachment)
> so i guess the question is how to not rasterize parts of the profile.
>

i think the magic was around this:
https://github.com/subsurface/subsurface/blob/master/profile-widget/divecartesianaxis.cpp#L14-L24
https://github.com/subsurface/subsurface/blob/master/profile-widget/divecartesianaxis.cpp#L32-L42

for the grid inside the cartesian coordinate system of the profile we
used a trick to scale it down during printing.

the same is missing in our generic "line" / "rectangle" items on the profile:
https://github.com/subsurface/subsurface/blob/master/profile-widget/divelineitem.cpp
https://github.com/subsurface/subsurface/blob/master/profile-widget/diverectitem.cpp

i might be able to give this a test next week.

lubomir
--

Willem Ferguson

unread,
Aug 7, 2020, 10:48:43 AM8/7/20
to subsurfac...@googlegroups.com
On 2020/08/07 09:51, Grey Wolf wrote:
> hi robert
>
> thanks for your explanation. thats exactly what I thought and I'm
> afraid there is no easy way to change that (especially when I think of
> different  operating systems). Screen rendered bitmaps always look
> like that in printing - that*s the way it is. by now I'm far away to
> start an discussion like "but before the profile is rendered to a
> bitmap it was a vector graphic" - that's nonsense.
> on the one hand it's a pity (especially in tec-dives) that probably
> the information of a critical descent/ascent maybe is not so
> recognizable by the color at  first glance but on the other hand a
> experienced, thinking diver sees it in the run of the curve - not the
> color.
>
> At last I have just one little question: would it be ok to publish
> printing templates on my own website (of course for free)? If so, I
> think I would need a little help where to put the templates on a mac
> or under linux (my mac-times ended up with OS9.2 and I'm a bit
> uncertain in linux) - just to get the right path for the templates.
>
> keep on howling
>
> grey

Hi wolf,

If your private print templates are useful to anyone else, I cannot see
why they could not form part of Subsurface master. There isa collection,
but this does not mean that they are either perfect or final. Maybe you
have an approach that would be useful to improve the present templates
or replace or add to the current collection.

Kind regards,

willem




--
This message and attachments are subject to a disclaimer.

Please refer to 
http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf
<http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf> for
full
details.

Grey Wolf

unread,
Aug 7, 2020, 12:07:36 PM8/7/20
to subsurfac...@googlegroups.com
hi willem

hm.... sounds great. you can tell, if the attached template is useful for other users. not me :-)

If you like it, I start working on the other templates - ideas welcome

and please give me a deadline, so I'm able to organize my time (I've got a job too)

regards

martin

--
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.
subbook_en.html

Dirk Hohndel

unread,
Aug 7, 2020, 1:21:21 PM8/7/20
to subsurfac...@googlegroups.com
This is an odd conversation for the user forum - maybe we should move this to the developer mailing list?
Either way, @notifications don't work :-)

Today we simply bundle the templates we support. It would be easy to add a special download folder for additional ones, if that is seen as valuable - but I'm not sure why we shouldn't just bundle them in the first place.

/D

-- 
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.
subbook_en.html

Dirk Hohndel

unread,
Aug 7, 2020, 1:25:19 PM8/7/20
to Subsurface Divelog
We typically don't work against deadlines - this is an open source project, people do things
when they have time to do things.

I expect to create a new Subsurface release later this month to capture new dive computers
that we support, so that would be a logical time to add this, but if it misses the next release,
there will be another one after that.

/D

subbook_en.html

Grey Wolf

unread,
Aug 8, 2020, 1:34:47 AM8/8/20
to subsurfac...@googlegroups.com
hi dirk

sounds really good to me. 
moving the whole thread to an "internal" mailing list woud be nice - is there a way to add my "main" email (martingroeger[et]hotmail[dot]com) - or shall I just subscribe in the "official" group with that address and you move it?

martin



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

Willem Ferguson

unread,
Aug 8, 2020, 5:37:49 AM8/8/20
to subsurfac...@googlegroups.com
On 2020/08/07 18:07, Grey Wolf wrote:
> hi willem
>
> hm.... sounds great. you can tell, if the attached template is
> useful for other users. not me :-)
>
> If you like it, I start working on the other templates - ideas welcome
>
> and please give me a deadline, so I'm able to organize my time (I've
> got a job too)
>
> regards
>
> martin


Subscribe to the developers mail list using the link in the Subsurface
web page under:

Documentation -> Contributing to Subsurface

There is probably not a reason why any new print templates could not be
housed with the existing templates. I suggest that tou write an extended
comment at the start of each template explaining how and why your
template differs from the equivalent stock standard. This makes it easy
for a user to choose a print template. My only gripe (but a very
personal gripe) with your template is that the space for notes is not
used efficiently with half of the horizontal space being taken up by the
"Notes" header. The original print templates wasted huge amounts of page
space and that is why I rewrote several of these templates to provide
more space for the dive profile. My own notes are sometimes extensive,
up to half a page, so I personally feel strongly about lots of space for
notes. But these just reflect a personal preference.

If you write one or more templates, for the moment we could probably
store them with the default templates. I would think there are only two
requirements.

1) As mentioned above, a description would be needed at the start of
each template to explain in which way your template differs from the
default templates.

2) We need to avoid a situation where all the print templates are mixed
together in a long random list that makes it difficult to choose a
template when printing a dive. Is Subbook a proprietary name, e.g. a
logbook system or other proprietary software? In that case you could
probably name your template(s) starting with "Subbook", e.g.
"Subbook-1-dive" or similar. Making the list of templates longer will
probably require me to look at the names of the default templates too so
that they are not scattered within a longer list.

I hope this makes sense?

Bob Barker

unread,
Jul 13, 2021, 3:15:04 PM7/13/21
to Subsurface Divelog
Evening Gents, Is there a way of adding total underwater time to a log page?

Thanks

Bob

Robert C. Helling

unread,
Jul 13, 2021, 3:59:33 PM7/13/21
to Subsurface Divelog
No, currently there are no variables that hold those kind of statistics information (total dive time for all dives until the current dive or in that calendar year or similar). But if there is demand, maybe we could add this.

Bob Barker

unread,
Jul 13, 2021, 4:05:57 PM7/13/21
to subsurfac...@googlegroups.com
Calendar year total is done in the statistics template?

--
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/iwBTPLuqmrQ/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/7af117af-e837-424b-a27b-83b1b551f7e8n%40googlegroups.com.


--
Bob Barker 

Ex Royal Navy, Happy Husband, Father of 2 adults, Grandad, Arsenal Fan, SCUBA diver and Engineer

Dive Log for Android - APK Download   

There are only 10 types of people in this world. Those who understand binary and those who don't!
There's no place like http://127.0.0.1
 
Reply all
Reply to author
Forward
0 new messages