-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When showing multiple marriages, they don't look nice and Links don't work in PDF's files. #531
Comments
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?
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).
I'll have a look into this and see if I can fix it. |
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 : [email protected]
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:
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 |
I don't think the comment about disposition would be an issue, it's likely because the URL has the & encoded as 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 For some reason I don't understand, if I run 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:
|
In the new.pdf links doesn't work. 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
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.
Where did you add the needed newline? 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
When I try to generate a .ps file directly in GVExport module, It can't find any image. I get this kind of errors:
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. |
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.
That's really interesting. If you ever work it out it would be good to understand why it isn't working.
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.
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.
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:
What do you have in your config file at These appear to be the only important sections for this (the PDF generates fine with everything else commented out):
Is yours the same? |
Well there's a difference
I don't know what does |
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? |
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.
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. |
cat /etc/system-release right now I don't remember the company. Sorry. I'll ask my brother tomorrow, I hope |
I've just fount the Graphviz documentation for URL says:
It doesn't mention pdf. Maybe newer versions don't accept links in pdf's Sounds odd, though |
We're actually using the "href" attribute in the HTML-like label, rather than directly on the node. Maybe that makes a difference. I was just reading this in the PostScript part:
Earlier you mentioned:
Maybe try using Edit: Ah nevermind, -Tps doesn't seem to support links, but does support the Cairo renderer for non-Latin-1 characters. -Tps2 supports links, but not the Cairo renderer 😮💨 |
Decided to just download the dot file from GVExport and try may windows versions of Graphviz. I placed this post asking for help. Let's see if it shed some light. |
Look. There's an option to colour the edges |
In Graphviz, "edges" refers to the lines between the "nodes". In our case, the arrows. And we already have options to change the arrow colour. Under Appearance -> Diagram -> Diagram style -> Relationship arrow colour. There is also an option there to use colours based on the relationship (birth or other than birth). I am realising as I write this that you are probably thinking of the option to use a random style, and perhaps the option to use random colours would be better? |
Hello
Yes. Something like that. I tried this one and liked it. There is no problem if you like other colors, ofcourse.
(The "static" keyword makes the value to be kept between function calls, so it always takes the next color, in the order of the "swtich" structure) By the way, steveroush made some recommendations about our dot generation. Here One of them is about the port names. Now that we have more than one picture, each one should have a different name. Could be pic, picbirth, picdeath, picburial, picmarriage1, picmarriage2, etc But those changes didn't fix my problem though.
|
The width is defined as 0 in about line 716 of app/Person.php inside function
|
We don't really know where arrows are heading as we create them, so it may not make a difference deliberately doing one colour after the next or just using a random selection from an array. I'll have a play and see what works well.
These are things that can be solved easily enough, but it would be good to first work out why your links don't work! Try making the changes manually and see if it fixes them. You could also try using a label attribute on a basic shape instead of our complicated HTML-like labels, and see if they work using that approach (we probably can't actually fix things like that, but it would be good to know if it does help). |
Thank you very much for the patience and effort. Just those changes didn't fix anything. I'll try your other suggestions and let you know. |
Just to let you know that steveroush suggested to open an issue, and there Matthew Fernandez I tried it removing the images from the .dot file and this time generated a pdf file with links working and all. Let's see what happens with the issue. |
That's a big clue! Does it work generating from GVExport with all photo settings disabled? |
Good question. If I generate directly without images the pdf from gvexport using the Server's Graphviz 2.44.1 (20200629.0846) the links still don't work. If I generate without images a dot file and then use Graphviz 12.2.0 on windows, the links do work. |
Hmm. it does seem to be related to the specific version then. If you manage to find and changes that allow it to work in the older version, please let me know! I'm happy to make changes if you work out what the issue is. |
Maybe if we could remove the EXIF information on the JPG files could work... but then, I don't know if it's enough. |
I just had a read through the issue you filed. It seems like there might be two issues. The later version installed on windows seems to have issues with the specific images you have, but it seems that this must be unrelated to your original issue. If you switch off images in GVExport and the links still don't work (in your Rocky Linux environment with Graphviz 2.44), then it must not be related to the images like you're seeing with Graphviz 12. I don't think I can help much at the moment, I'll let your issue play out and see if you get a resolution from it. |
I'm going to close this for the moment if that's ok. The parts that can be resolved have gone in the 2.1.23 release, and I don't want to get mixed up with what is in which release. If you get a resolution to this, I'd be interested to hear it. You can still reply when the issue is closed, and I'll be notified so I should see it. Alternatively you can also open a new issue if that is more appropriate. |
It's ok. The only missing thing is the random colored lines. Right?
I opened a new issue for this (Random colors in lines. #549) |
As a final note, I discovered I can generate (download) the report in SVG format, and then convert it to pdf using an online service. This way, the links and images do work ok in the final PDF file. BE AWARE: I don't know what does that service does with the uploaded files, I mean, I don't know if they gather it's contents for other uses (licit or illicit). |
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)
The text was updated successfully, but these errors were encountered: