webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Produce large format pdf tree.

Open billthefarmer opened this issue 9 years ago • 7 comments

This appears to be a feature that is missing, to produce a large format pdf file of the whole tree that can be printed out and hung on the wall. I have had a go at it as a stand alone utility, see https://github.com/billthefarmer/gpdf. However the code uses a text file to lay out the tree. A development of the interactive tree feature might do the job.

billthefarmer avatar Jul 15 '16 09:07 billthefarmer

pdf file of the whole tree

I don't believe this is possible, except for small/trivial trees.

You can draw subsets of this (ancestors of X or descendants of Y), but I can't imagine how you would draw everyone.

fisharebest avatar Jul 16 '16 18:07 fisharebest

It depends, as you say, on the complexity of the tree, but I think it should be possible to attempt an algorithm. It would be a combination of recursion and iteration using a set of rules, such as:

  • Divide the page into slots according to the number of generations and the maximum number of individuals and different families in a generation.
  • Start with the first individual in the database and place them in the centre of the page vertically in the correct generation and build the tree around them. This individual would be expected to be either the person building the tree, or a relative he or she is building the tree around.
  • Siblings should be in order of birth from top to bottom
  • Parents should be in line with children vertically, offset towards the top or bottom according to whether above or below the centre of the page.
  • Fathers should either be above or below mothers consistently, either an option or depending on a patriarchal or matriarchal tree.
  • No more than one individual to a slot.

The algorithm would run iteratively making adjustments until either the problem it is found to be insoluble or an iteration finds no changes to make.

An enhancement to make following families easier, have a extra slot vertical gap between different families in each generation.

billthefarmer avatar Jul 19 '16 13:07 billthefarmer

How did gramps solved this?

arjanvs avatar Dec 12 '16 22:12 arjanvs

I just had a look. there's a plugin Family Tree that does something similar, but it doesn't look like it handles offshoots and things like that. I tried gramps at the time, it wouldn't import our data from webtrees correctly.

billthefarmer avatar Dec 13 '16 10:12 billthefarmer

For me it does import correctly. It makes nice relationship charts. Sometimes a bit to large ;)

arjanvs avatar Jan 25 '17 19:01 arjanvs

Well, it was a while ago and we were just trying it out to see what it could do without much luck.

billthefarmer avatar Jan 29 '17 09:01 billthefarmer

I have a new report module 'family_tree' that is ready to be included when PR #4945 is included! This report module can produce up to size A2, fairly easy to add even bigger formats if wanted.

sevtor avatar Feb 06 '24 15:02 sevtor