What is the signification / usage of section and subsection

139 views
Skip to first unread message

Florent Thomas

unread,
May 21, 2018, 4:34:23 AM5/21/18
to wkhtmltopdf General
Hi,

I'm trying to know what is the signification of section and subsection . I understand very well where footer and header are placed but I'm not able to understand the meaning of the structure of the entire document.

I'm used to work with other reporting tool and I would like to be able to inject values like page etc in the middle of a page.

Thanks in advance for your reply

eric w

unread,
May 24, 2018, 11:17:32 AM5/24/18
to wkhtmltop...@googlegroups.com
Florent, 
That's a good question. Can you provide a link to documentation about section and subsection? I've never read that. 



--
===================================================
You received this message because you are subscribed to the "wkhtmltopdf General" group.
To post to this group, send email to wkhtmltopdf-general@googlegroups.com
To unsubscribe from this group, send email to wkhtmltopdf-general+unsub...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/wkhtmltopdf-general?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "wkhtmltopdf General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wkhtmltopdf-general+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Peat

unread,
Jun 2, 2018, 10:13:23 AM6/2/18
to wkhtmltopdf General
I've been trying to figure-out this - documentation is pretty-much non-existant so I'll explain what I've found.

The QT Hack builds a tree out of the H1-H9 elements it finds and assigns them into (upto) 3 variables which are passed to header.html and footer.html

Section will be the last H1 element found (at the point the header/footer is inserted) - if there are no H1s, it will be the last H2 and so on
SubSection will be the next/lowest <H> element after the Section one
SubSubSection will be the... you get the idea 

The code (outline.cc) which does this admits (in a comment) that there are possible problems doing this and it's easy to break it completely 
I've seen issues where some elements are ignored for reasons I cannot fathom

It also doesn't reset headings when encountering higher headings (this is a straight-out bug really) - e.g.

H1
H2
H3
H2
At this point, you will still have the H3 element - even tho it's clearly not relevant
H1
At this point you still have the H2 AND H3 elements - now outright nonsense...

I've tried a few workarounds but I think the whole handling of Section/SubSection/SubSubsection needs redoing from-scratch - at the very least it must clear-out lower headings when it encounters new higher ones 

Most people using these would be looking for some sort of 'breadcrumbs' display - e.g. H1 > H2 > H3 and you just cannot do that with the data it provides - at least not reliably...
Reply all
Reply to author
Forward
0 new messages