Open elysch opened 3 days ago
I discovered another thing.
If each marriage has a "first image", only the first one is shown, instead of showing the first image of each marriage.
Ely
I've just saw that when multiple marriages are active, they doesn't look nice in the report:
Ah it seems when the first line is too long, it wraps to the next line but doesn't correctly move the second marriage down.
I'm not sure that the dash is necessary, though. The dash implies some sort of time period, like "John Smith, 1940-1999". I think a space between looks just fine. Thoughts?
P.S.: I remember reporting the issue about the links on PDF's but don't see any issue active mentioning it that's why I add it here. (Sorry, don't want to annoy anybody)
Do you have Graphviz installed on the server? This is necessary for links in PDFs, and you can't use functionality that is only available with client-side generation (I think this is just photo shapes).
If each marriage has a "first image", only the first one is shown, instead of showing the first image of each marriage.
I'll have a look into this and see if I can fix it.
Wow... really fast answer!!!!
You're right... the dash is not needed at all.
The images I added to the issue come from the generated pdf.
Yes... I have Graphviz installed on sever and is active.
And the "links" setting is active.
The links work just fine in the browser, but not in the PDF file
Wow... really fast answer!!!!
I happened to be checking my emails when you created this issue :slightly_smiling_face:
The links work just fine in the browser, but not in the PDF file
Interesting. The browser links are separate so aren't relevant to the PDF links, but it looks like it should be working. It is definitely working for me. Is this also disabled?
Yes, it has "No change".
Since it works for you... it makes it harder to debug :(
[xxxx@xxxx modules_v4]# rpm -qi graphviz-2.40.1-45.el8.x86_64
Name : graphviz
Version : 2.40.1
Release : 45.el8
Architecture: x86_64
Install Date: Mon 01 Jul 2024 02:08:13 PM CST
Group : Unspecified
Size : 8258919
License : EPL-1.0
Signature : RSA/SHA256, Tue 05 Dec 2023 11:20:03 AM CST, Key ID 15af5dac6d745a60
Source RPM : graphviz-2.40.1-45.el8.src.rpm
Build Date : Tue 05 Dec 2023 11:00:24 AM CST
Build Host : ord1-prod-x86build002.svc.aws.rockylinux.org
Relocations : (not relocatable)
Packager : infrastructure@rockylinux.org
Vendor : Rocky
URL : http://www.graphviz.org/
Summary : Graph Visualization Tools
Description :
A collection of tools for the manipulation and layout of graphs (as in nodes
and edges, not as in barcharts).
[xxxx@xxxx modules_v4]#
I can see a lot of lines like the following in the dot file:
I57 [ label=<<TABLE COLOR="#606060" BORDER="1" CELLBORDER="0" CELLPADDING="2" CELLSPACING="0" BGCOLOR="#fefefe" TARGET="_blank" HREF="https://...
Those links work ok when I directly copy them to the browser.
When the individual has an image, there is an additional HREF in the same line. The link looks like this (replaced the domain and part of the path with : XXX.XXX.XXX)
When I copy one of those links to the browser I get a webtrees message saying The parameter “disposition” is missing.
I don't think the comment about disposition would be an issue, it's likely because the URL has the & encoded as &
but in real use it shouldn't be an issue. In any case, it should at least open something if clicked.
Here is one I've generated. It's in my dev environment so the link won't actually work, but when you open the PDF and click on a person it should open a browser window and try to go there. Does it work?
You do seem to have a slightly older version of Graphviz installed. I'm running webtrees in a docker container, and if I run dpkg -s graphviz
it tells me the version is Version: 2.42.2-7+deb12u1
For some reason I don't understand, if I run dot -v
then it tells me dot - graphviz version 2.43.0 (0)
which seems to imply the graphviz version is 2.43.0.
In either case, you're running 2.40.1 so perhaps this difference is the problem? Seems odd though, if it was working before.
Could you please send to me your .dot file an let me know the dot command parameters I should use?
Just to be sure.
In my pdf not even the mouse pointer changes when you move over a supposed to be link.
Here is my settings file which you should be able to load using the option in GVExport. The people will need to match someone in your tree (so you probably need to update the starting individual) but otherwise it should load ok:
I can't upload the DOT here as it's an unsupported file type but here is the contents:
digraph WT_Graph {
ranksep="0.15 equally"
nodesep="0.15"
dpi="72"
mclimit="1"
rankdir="LR"
pagedir="LT"
bgcolor="#eeeeee"
splines="spline"
edge [ style=solid, arrowhead=normal, arrowtail=none];
node [ shape=plaintext font_size="10" fontname="Arial"];
X1 [ label=<<TABLE COLOR="#606060" BORDER="1" CELLBORDER="0" CELLPADDING="2" CELLSPACING="0" BGCOLOR="#fefefe" TARGET="_blank" HREF="http://192.168.1.100:8089/tree/gvetest/individual/X1/Joseph-Joe-BLOGGS"><TR><TD COLSPAN="6" CELLPADDING="2" BGCOLOR="#add8e6" PORT="nam" ></TD></TR><TR><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="40" HEIGHT="40" FIXEDSIZE="true" ALIGN="CENTER" VALIGN="MIDDLE"><IMG SCALE="true" SRC="/var/www/webtrees/app/../data/media/boy5.png" ALT="Joseph Joe BLOGGS" /></TD><TD ALIGN="LEFT" BALIGN="LEFT" TARGET="_BLANK" CELLPADDING="4" PORT="dat"><FONT COLOR="#333333" POINT-SIZE="12">Joseph "Joe" BLOGGS</FONT><BR /><FONT COLOR="#555555" POINT-SIZE="10">* 4 May 1944 </FONT><BR /><FONT COLOR="#555555" POINT-SIZE="10">† 7 March 2004 (Place, Death)</FONT> </TD><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="0" HEIGHT="40" FIXEDSIZE="true"></TD><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="0" HEIGHT="40" FIXEDSIZE="true"></TD><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="0" HEIGHT="40" FIXEDSIZE="true"></TD><TD CELLPADDING="10"></TD></TR></TABLE>>];
X40 [ label=<<TABLE COLOR="#606060" BORDER="1" CELLBORDER="0" CELLPADDING="2" CELLSPACING="0" BGCOLOR="#fefefe" TARGET="_blank" HREF="http://192.168.1.100:8089/tree/gvetest/individual/X40/Jane-Smith"><TR><TD COLSPAN="6" CELLPADDING="2" BGCOLOR="#ffb6c1" PORT="nam" ></TD></TR><TR><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="40" HEIGHT="40" FIXEDSIZE="true" ALIGN="CENTER" VALIGN="MIDDLE"><IMG SCALE="true" SRC="/var/www/webtrees/app/../data/media/girl1.png" ALT="Jane Smith" /></TD><TD ALIGN="LEFT" BALIGN="LEFT" TARGET="_BLANK" CELLPADDING="4" PORT="dat"><FONT COLOR="#333333" POINT-SIZE="12">Jane Smith</FONT><BR /><FONT COLOR="#555555" POINT-SIZE="10">* 2 August 1945 </FONT> </TD><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="0" HEIGHT="40" FIXEDSIZE="true"></TD><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="0" HEIGHT="40" FIXEDSIZE="true"></TD><TD ROWSPAN="2" CELLPADDING="1" PORT="pic" WIDTH="0" HEIGHT="40" FIXEDSIZE="true"></TD><TD CELLPADDING="10"></TD></TR></TABLE>>];
X41 [ color="#606060",fillcolor="#ffffee", target="_blank" href="http://192.168.1.100:8089/tree/gvetest/family/X41/Joseph-Joe-BLOGGS-Jane-Smith", target="_blank", shape=oval, style="filled", margin=0.01, label=<<TABLE border="0" CELLPADDING="5" CELLSPACING="0"><TR><TD><FONT COLOR="#555555" POINT-SIZE="10">∞ 16 March 1967<BR /></FONT></TD></TR></TABLE>>];
X1 -> X41 [color="#555555", style="solid", arrowsize=0.3]
X40 -> X41 [color="#555555", style="solid", arrowsize=0.3]
}
Could you please send to me your .dot file an let me know the dot command parameters I should use?
Oh sorry, you're gonna try manually running the command? Running this command works for me, and has the links:
dot -Tpdf -o new.pdf gvexport.dot
But this is done with a different version of Graphviz, on my computer not in the docker container with webtrees:
dot - graphviz version 9.0.0 (20230911.1827)
There are lots of warnings and the images fail because they aren't there, but the output otherwise works, and links work:
In the new.pdf links doesn't work. I don't get it. Something must have changed in the server. But I don't remember changing Graphviz.
Forget it, I'll try to upgrade or do something
Thank you for your time
Are you familiar with docker? It would be interesting to know if it works for you in a webtrees docker container (which should be system agnostic and therefore work the same everywhere), but it can be a bit of a learning curve if you're not already familiar.
Alternatively, it is probably not too difficult to download a more recent version of Graphviz directly from their site. I'd be interested to know if you work it out!
I installed Graphviz CentOS 8 rpm's and now "dot -V" reports
dot - graphviz version 2.44.1 (20200629.0846)
The links are still missing. It's weird. Just in case I looked for any graphviz "config" file without success.
Before that, I tried more recent graphviz versions without success, culdn't install them since my server is kind of old.
About containers... I don't have an environment now, but I'll look for it also :) (Have you heard about litespeed conteiners?)
P.S. I'm thinking the links never worked in pdf's generated in this server. Maybe I mistakenly just tested them in the browser on this year... The newest GVexport report with working links I have is from 2017 :/ :(
By the way.
I'm not sure that the dash is necessary, though. The dash implies some sort of time period, like "John Smith, 1940-1999". I think a space between looks just fine.
Where did you add the needed newline? Downloaded the last main branch and it still shows the marriages one after the other in the same line.
Tnx
What I've just found is that if I convert .dot to ps and then convert it using ghostscript's ps2pdf , the links do work, but apparently ghostscript doesn't support utf-8
dot -Tps2 -o new.ps /tmp/gvexport.dot
ps2pdf /tmp/new.ps /tmp/new2.pdf
When I try to generate a .ps file directly in GVExport module, It can't find any image. I get this kind of errors:
Warning: "data/media/XXXXXX.jpg" was not found as a file or as a shape library member
Error: No or improper image file="data/media/XXXXXX.jpg"
If I execute directly in the console the command shown at the beginning of the errors, it doesn't complain about the images not being there, but they are not shown in the PDF after ps2pdf.
:(
Cheers.
About containers... I don't have an environment now, but I'll look for it also :) (Have you heard about litespeed conteiners?)
I hadn't, and it sounds like they were only announced a couple of months ago. It also sounds like it's designed for people that sell web hosting.
For containers hosting individual services (like webtrees), I think docker is already the defacto solution and it does a good job of it. I'm happy to help if you want some instructions on how to set up webtrees in a docker container.
P.S. I'm thinking the links never worked in pdf's generated in this server. Maybe I mistakenly just tested them in the browser on this year... The newest GVexport report with working links I have is from 2017 :/ :(
That's really interesting. If you ever work it out it would be good to understand why it isn't working.
Where did you add the needed newline? Downloaded the last main branch and it still shows the marriages one after the other in the same line.
Sorry, I haven't made this change yet. The screen shot was created by manually editing the DOT file, but I intend to make this change next.
What I've just found is that if I convert .dot to ps and then convert it using ghostscript's ps2pdf , the links do work, but apparently ghostscript doesn't support utf-8
Hmm that's a shame. I'm reading here that your method is the recommended way if your environment doesn't have the Cairo renderer. So that is something to test. Are you able to use the SVG output in GVExport? This specifically calls the Cairo renderer as it is needed for the pictures - but make sure you disable links first. The Cairo renderer doesn't support links in SVG so GVExport uses the browser if links are enabled.
Thank you for your offering about Dockers... Apparently I don't have enough ram at the moment.
The SVG file, without links option, was generated without a problem. I opened it in chrome browser and seems ok.
[xxxx@xxxx webtrees]# dot -v -Tpdf -o /tmp/new5.pdf /tmp/x.dot
dot - graphviz version 2.44.1 (20200629.0846)
Using render: cairo:cairo
Using device: pdf:cairo:cairo
libdir = "/usr/lib64/graphviz"
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
/usr/lib64/graphviz/config6
was successfully loaded.
render : cairo dot dot_json fig json json0 map mp pic pov ps svg tk vml xdot xdot_json
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : bmp canon cmap cmapx cmapx_np dot dot_json eps fig gv ico imap imap_np ismap jpe jpeg jpg json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz x11 xdot xdot1.2 xdot1.4 xdot_json xlib
loadimage : (lib) bmp eps gif ico jpe jpeg jpg pdf png ps svg
pack info:
mode undefined
size 0
flags 0
margin 8
pack info:
mode node
size 0
flags 0
Warning: Illegal attribute ALT in <IMG> - ignored
Warning: No such file or directory while opening /var/www/webtrees/app/../data/media/boy5.png
Error: No or improper image file="/var/www/webtrees/app/../data/media/boy5.png"
fontname: "Arial" resolved to: (PangoCairoFcFont) "Nimbus Sans, Regular" /usr/share/fonts/urw-base35/NimbusSans-Regular.otf
Warning: fixed cell size with unspecified width or height
Warning: fixed cell size with unspecified width or height
Warning: fixed cell size with unspecified width or height
network simplex: 4 nodes 4 edges maxiter=2147483647 balance=2
network simplex: 4 nodes 4 edges 0 iter 0.00 sec
network simplex: 7 nodes 7 edges maxiter=2147483647 balance=2
network simplex: 7 nodes 7 edges 0 iter 0.00 sec
in label of node X1
Warning: Illegal attribute ALT in <IMG> - ignored
Apparently it is using cairo renderer.
Could you please execute the dot command with "-v" option when the links do work in order to compare the output with this one?
Sure, here you go:
$ dot -v -Tpdf -o new5.pdf gvexport.dot
dot - graphviz version 9.0.0 (20230911.1827)
Using render: cairo:cairo
Using device: pdf:cairo:cairo
libdir = "/lib64/graphviz"
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
/lib64/graphviz/config6
was successfully loaded.
render : cairo dot dot_json fig json json0 lasi map mp pic pov ps svg tk xdot xdot_json
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 kitty kittyz mp pdf pic plain plain-ext png pov ps ps2 svg svgz tk vt vt-24bit webp x11 xdot xdot1.2 xdot1.4 xdot_json xlib
loadimage : (lib) eps gif jpe jpeg jpg pdf png ps svg webp
pack info:
mode undefined
size 0
flags 0
margin 8
pack info:
mode node
size 0
flags 0
Warning: Illegal attribute ALT in <IMG> - ignored
Warning: No such file or directory while opening /var/www/webtrees/app/../data/media/boy5.png
Error: No or improper image file="/var/www/webtrees/app/../data/media/boy5.png"
fontname: "Arial" resolved to: (PangoCairoFcFont) "Liberation Sans, Regular" /usr/share/fonts/liberation-sans/LiberationSans-Regular.ttf
Warning: fixed cell size with unspecified width or height
Warning: fixed cell size with unspecified width or height
Warning: fixed cell size with unspecified width or height
network simplex: 4 nodes 4 edges maxiter=2147483647 balance=2
network simplex: 4 nodes 4 edges 0 iter 0.00 sec
network simplex: 7 nodes 7 edges maxiter=2147483647 balance=2
network simplex: 7 nodes 7 edges 0 iter 0.00 sec
in label of node X1
Warning: Illegal attribute ALT in <IMG> - ignored
Warning: No such file or directory while opening /var/www/webtrees/app/../data/media/girl1.png
Error: No or improper image file="/var/www/webtrees/app/../data/media/girl1.png"
Warning: fixed cell size with unspecified width or height
Warning: fixed cell size with unspecified width or height
Warning: fixed cell size with unspecified width or height
network simplex: 4 nodes 4 edges maxiter=2147483647 balance=2
network simplex: 4 nodes 4 edges 0 iter 0.00 sec
network simplex: 7 nodes 7 edges maxiter=2147483647 balance=2
network simplex: 7 nodes 7 edges 0 iter 0.00 sec
in label of node X40
network simplex: 3 nodes 2 edges maxiter=2147483647 balance=1
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
Maxrank = 1, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross WT_Graph: 0 crossings, 0.00 secs.
network simplex: 5 nodes 5 edges maxiter=2147483647 balance=2
network simplex: 5 nodes 5 edges 0 iter 0.00 sec
routesplines: 2 edges, 6 boxes 0.00 sec
Using render: cairo:cairo
Using device: pdf:cairo:cairo
gvRenderJobs WT_Graph: 0.00 secs.
What do you have in your config file at /usr/lib64/graphviz/config6
?
These appear to be the only important sections for this (the PDF generates fine with everything else commented out):
libgvplugin_dot_layout.so.6 dot_layout {
layout {
dot 0
}
}
libgvplugin_pango.so.6 cairo {
render {
cairo 10
}
textlayout {
textlayout 10
}
loadimage {
png:cairo 1
png:lasi 2
png:ps 2
}
device {
png:cairo 10
ps:cairo -10
eps:cairo -10
pdf:cairo 10
svg:cairo -10
}
}
Is yours the same?
Well there's a difference
libgvplugin_pango.so.6 cairo {
render {
cairo 10
}
textlayout {
textlayout 10
}
loadimage {
png:cairo 1
#FAILS png:lasi 2
png:ps 2
}
device {
png:cairo 10
ps:cairo -10
eps:cairo -10
pdf:cairo 10
svg:cairo -10
}
}
libgvplugin_poppler.so.6 poppler {
loadimage {
pdf:cairo 1
}
}
I don't know what does png:lasi
does, but I don't think it would be the problem
I agree, I don't think png:lasi would be related. So it's probably not the config. Might be the version?
What hardware are you running it on? Is it a SBC (raspberry pi, etc) or some other ARM device, an old desktop/laptop, or is a commercial VPS?
Where did you add the needed newline? Downloaded the last main branch and it still shows the marriages one after the other in the same line.
I've just merged the changes into the main branch, so you can check it out now :slightly_smiling_face:. I've also fixed the issue with only one photo showing.
I've just merged the changes into the main branch, so you can check it out now 🙂. I've also fixed the issue with only one photo showing.
Thank you very much. I've already tested it. Looks great.
What hardware are you running it on? Is it a SBC (raspberry pi, etc) or some other ARM device, an old desktop/laptop, or is a commercial VPS?
I have a commercial VPS.
Just for testing I downloaded Graphviz 11 and 12 for windows 11. (No need to install it)
Downloaded a DOT file and converted it to PDF.
Beyond the missing images, with version 11 links didn't work and with the version 12 they did.
I guess some Graphviz versions simply don't handle well the links and others do. Bad luck for me
What's the VPS you're using? Is it ARM or x86? What's the specific OS version you're using? If you let me know the specific company and plan that would help.
If I can recreate your environment I might be able to help find the issue.
Hi.
I've just saw that when multiple marriages are active, they doesn't look nice in the report:
I suggest adding a blank line with a "-" between each one.
Ely.
P.S.: I remember reporting the issue about the links on PDF's but don't see any issue active mentioning it that's why I add it here. (Sorry, don't want to annoy anybody)