Pedigree chart and print preview 1.7.0-dev

Bug #1426714 reported by meliza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webtrees
Fix Released
Low
Rob Peters

Bug Description

We should be able to print the landscape and the portrait pedigree chart on one page.

Landscape and portrait Pedigree chart print preview in all the themes
In A4 sized paper – no margins - mother's mother's mother's data is printed on page 2 (portrait Letter sized paper prints even more on page 2)
We need to print the chart a little higher on the page and/or the boxes need to be a little smaller.

Chart person box in fab
I need 6 lines of data (I have ltr & rtl names) – 4.5 lines are printed

Landscape Pedigree person box print preview in fab
I need 6 lines of data (I have ltr & rtl names) – 4.5 lines are printed

Chart person box in minimal
I need 6 lines, I see 5.5 lines

Landscape Pedigree person box print preview in minimal
I need 6 lines of data – 5 lines are printed

We could print the 2 names closer to each other

Meliza

Revision history for this message
meliza (meliza) wrote :

I should have written

Landscape Pedigree person box print preview in fab
I need 6 lines of data (I have ltr & rtl names) – 4 lines are printed

Revision history for this message
Rob Peters (makitso) wrote :

The minimal and FAB themes use larger fonts in the themes which leads to overflow in some cases.

There are two (or more) potential ways to address this,

1. Make the box size in FabTheme.php and MinimalTheme.php to a larger size say 270. This would preserve the larger text but increase the display area. This option will impact the printing since the blocks will take more room on the printed page.

2. Reduce the size of the text in the display blocks. This seems like the wrong direction since FAB and minimal were intended to be "easier" to see for people with visual issues.

Either option can have some side effects.

Revision history for this message
meliza (meliza) wrote :

I have changed locally the minimal theme boxes to 282x94. Both the chart and the printing look good.

I have changed locally the fab theme boxes to 320x105. I see the full chart on one page only on a big screen or if I change the zooming of the page.
I see the full chart on the printed page.
I do not see fully the 6th person box row on the printed page.

I see now 6 data rows in the charts in all the themes.

I have added locally to the style.css files
@media print and (orientation: landscape) {
 #pedigree_chart {
  top: -nnpx;
 }
}
(nn values: clouds, colors 30, fab 70, minimal 60, webtrees, xenea 20)
I see the printed landscape charts on one page when I use no margins.

I am satisfied with the printed charts on Letter sized paper.

I have not touched the portrait layout printing. The charts are still printed on 2 pages.

Revision history for this message
Rob Peters (makitso) wrote :

I have made a number of minor changes to the display style for FAB and minimal -- they display correctly using WIN8 and Chrome. However, there so many variations in print functions between browsers, operating systems, page sizes, etc., that the fix does not address. So, I am closing this bug.

Changed in webtrees:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → makitso (makitso)
Revision history for this message
meliza (meliza) wrote :

The landscape chart looks now nice in all the themes on Letter sized paper.

It prints a part of the chart on page 2 when we use A4 sized paper.

This Letter sized paper is a recognized standard adopted by the American National Standards Institute (ANSI) whereas the A4 is the International Standard (ISO) used in most countries.

from http://www.a4papersize.org/
A4 size is the most common paper standard in the world. The exception is the United States of America and Canada.
Many South American countries such as Mexico, Costa Rica, Chile, Venezuela and more, have officially taken on the A4 paper size standard. However, the most common paper size in these countries is still 'Letter Size'.

webtrees has to be able to print the pedigree both on Letter and on A4 sized paper. As far as I see, this has nothing to do with the browser or the operating system.

Revision history for this message
Rob Peters (makitso) wrote :

On the Windows platform, Internet Explorer and Firefox give the user the print option to scale the printing. It looks like 80% works for A4 formats in Landscape or Portrait.

Unfortunately, Chrome does not currently have a scale function.

Revision history for this message
meliza (meliza) wrote :

Greg instructed me some time ago to use Chrome, because Internet Explorer and Firefox did not support dir="auto".
I use Chrome and I have asked my users to use Chrome.

Since then it seems that fireFox already supports dir="auto". Internet Explorer does not yet support it.

I think that webtrees should be able to print the pedigree charts on one page without requiring the users to scale the report manually.

Revision history for this message
David E Drury (david-drury) wrote :

We can gain a bit more real estate on the printed page by adding

 #pedigree-page h2 {
  margin: 0;
 }

 #pedigree_chart {
  margin: 0 auto;
 }

to the @media print css rules

I have a minor bug fix on pedigree.php to submit to Greg (wrong parameter in URL) I could include these as well if deemed appropriate

Revision history for this message
Rob Peters (makitso) wrote :

Good suggestion David, yes, include that code.

Revision history for this message
Rob Peters (makitso) wrote :

Good suggestion David, yes include that code.

Revision history for this message
Rob Peters (makitso) wrote :

Good suggestion David, yes, include that code.

Revision history for this message
meliza (meliza) wrote :

David,

I tried the change in two themes.

The change improves the way we print the chart in landscape.

It does not print the chart fully on one page in portrait.

Meliza

Revision history for this message
meliza (meliza) wrote :

I have added to the style.css files
@media print and (orientation: portrait) {
 #pedigree_chart {
  zoom: 80%;
 }
}

and for fab
@media print and (orientation: landscape) {
 #pedigree_chart {
  top: -20px;
 }
}

@media print and (orientation: portrait) {
 #pedigree_chart {
  zoom: 75%;
 }
}

This way I see the charts in Google Chrome print (preview) on one page.

Meliza

Revision history for this message
meliza (meliza) wrote :

David,

I have tested in Chrome and FireFox browsers how the updated pedigree chart prints in landscape and in portrait layout in the different themes on A3 and Letter sized paper.

I see only the landscape pedigree as expected on one page in the webtrees theme.
All the other options print on 2 pages.

I have added to my local theme style.css files the following and I see all the print preview pedigree chart combinations as expected on one page.
@media print and (orientation: landscape) {
 #pedigree_chart {
  zoom: aa%;
 }
}

@media print and (orientation: portrait) {
 #pedigree_chart {
  zoom: bb%;
 }
}
where the values of aa and bb are
theme aa bb
clouds 90 85
colors 90 85
fab 85 80
minimal 95 85
webtrees 85
xenea 95 85

Meliza

Revision history for this message
meliza (meliza) wrote :

In webtrees I have added only
@media print and (orientation: portrait) {
 #pedigree_chart {
  zoom: 85%;
 }
}

Revision history for this message
meliza (meliza) wrote :

I have added to the style sheets for Letter and a4 sized paper

@media print and (orientation: landscape) {
 #pedigree_chart {
  zoom: nn%;
 }
}

@media print and (orientation: portrait) {
 #pedigree_chart {
  zoom: mm%;
 }
}

where the values are
                            nn mm
clouds..............90....... 85
colors...............90.......85
fab....................85.......80
minimal...........95.......85
webtrees....................85
xenea..............95.......85

in fab landscape I have also added top: 50px;
in webtrees landscape I have not added zoom.

Revision history for this message
fisharebest (fisharebest) wrote :

Fix released in 1.7.0

Changed in webtrees:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.