Generate reports including photos?

(Gramps 5.15 on Linux Mint 20.3)

Hi,

I’ve been playing with Gramps since 1 month and I’d like to generate a report including photos, and I can’t achieve it.

For instance, for a person, I have events for birth, wedding (date unknown) and death. I’ve got the “official” picture of the wedding, that I attached to the marriage event (through the Gallery tab).

I produced reports with:

  • Complete individual report
  • Famly group report
  • Detailed descendant report with all images (plugin)

… and the wedding photo is not displayed.

I have several other events with photos associated.

I’d like to generate a PDF with history of relatives to send to (old) people in my family. Including photos would bring a lot more of emotion (rather than a precise but stark text report).

How could I generate reports including photos?

Hmmm. The reports with photos that I’ve noticed have always had the Media attached to a Person, not an Event or Place.

Looks like some experimenting has now been added my schedule tomorrow!

2 Likes

In the Detailed Descendant Report with all Images, did you include Events?

I have census images as media in the gallery of Census Events. These images get printed IFF you Include Events (in the Include tab) of the report.

@GaryGriffin Yes I did. I ticked all the checkboxes. I just double checked, the events (and images/media) are ticked. (I do not have census events)

The other hitch might be that the Media would’ve been attached to a Marriage Event that would have a Family Role in a Family container under the Spouses.

A test would need to see if the Family printing included the secondary objects of non-primary Role event and its secondary objects in the report.

Fun, fun…

Correction - it is more complicated based on tests I ran (not examining code)

The Gallery for the Event is not printed.
The Gallery for the Citation of the Event is printed if and only if the volume/page field or the date field is non-blank.

So to print an image for a Marriage, you would have a Marriage Event. That event would have a Citation. That citation would have a gallery image(s) and either a volume/page or date entry.

At least that seems to be what I am seeing when I run tests .

3 Likes

Thank you very much @GaryGriffin for your investigation. For a first time user, I find this behaviour quite awkward. Did I miss something in my methodology? Are my objectives incorrect? Or is it a bug, or an “expected feature” never seen? (Thanks in advance!)

I know the Dynamic Web Report exports images well from events, citations or sources, even from places. May be its medias selection could be reused into other reports (I don’t examine its source)

3 Likes

The Narrative Web will also display all media from all gallery tabs. I create sites and put them on thumb drives to send to relatives.

I was just trying to understand the existing Detailed Descendent report as it works today. I can file a bug in Mantis on its behavior on choosing media to include now that I know its methodology.

The Census Events are created by the Forms plug-in, so are consistent.

Personally, almost all of my media which are part of an event are thru a citation, so they print fine in this report. Hence I did not notice the limitation.

So I see two parts of this:

  • what is the right way(s) to put media on an event. This is an open topic, I think. Personally I use thru a citation so I know where and when the media was generated. So a marriage certificate scanned image is media attached to a citation (which has a source and a date) which is attached to a Marriage Event. I do not put the media on the event directly.
  • add all media to this report

Filed Mantis bug : https://gramps-project.org/bugs/view.php?id=12641

1 Like

For the Complete Individual Report have you ‘ticked’ the box in ‘Include’?

I do not known about the other reports but to me look like the sort of reports that would not have images.

Absolutly, I ticked all the checkboxes.

(I couldn’t upload my screenshot ; CORS error related to S3 bucket : Failed to upload image.png AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See AWS S3 Multipart — Uppy for instructions.)

Thank you very much @GaryGriffin for filing the bugreport!

I hope this will be correctly understood (I saw it was marked as duplicate of another bug, bug that seems a bit far from my issue, at least to my understanding :slight_smile: )

I think the Narrative Web report does better than the Dynamic Web report with images in at least one respect, but at a significant cost. With either report, you can access the correct media from the individual pages.

But with the Dynamic Web report, it is extremely difficult to go from the media page to the person(s) with which it is associated. That is because the references section on the media pages in the Dynamic Web report only lists the Source, and if the Source has many citations (for example, I use a single source for Missouri death certificates downloaded from the Secretary of State website but a separate citation for each one) you can’t easily navigate from the media page to the person or event associated with it.

The Narrative Web report has a more complete reference section that includes all citations and the events and people associated with them.

The cost is that it takes far longer to generate a Narrative Web report with media objects. My database has over 15,000 media objects that are not marked private, including over 5,000 census pages and about 6,000 death certificates. It takes 14 to 15 hours to generate a Narrative Web report with almost all of the time spent generating media pages, while it takes an hour or less to generate a Dynamic Web report with the same data.

I too have noticed this. Depending on the size of the branch family I am creating, I set it to start when I go to bed turning off the computer’s OS sleep features letting it run all night.

It used to be that way when I would delete all the thumbnails and then using the thumbnail generator to repopulate the folders. I forget which release it was but now the generator can handle 25K media files in an hour.

I do not understand why the Narrative web takes so long to generate the media pages. After all, the thumbnails have already been generated. Do we need to have a third size of thumbnail?

As the author of the Detailed Descendant Report with all images, this sounds like something I’d like to fix. The source is at addons-source/DetDescendantReport-images at master · gramps-project/addons-source · GitHub and is based on the original Detailed Descendant Report. I don’t believe I can assign the ticket to myself, but I’ll start monitoring it and see if I can modify the report to fix it. It’s been some time since I’ve worked on this report, but hopefully it’ll come back quickly.

3 Likes

If an image is attached to an event, when the report is generated, where would make the most sense to put the image? The report is centered around individuals, so an event is output for each individual referenced in the event. Based on this I’d probably output the images for the event with each individual referenced in the event. Another idea would be to have a section of events at the end of the report, like the citations and put the images there. Thoughts from other users?

2 Likes

You might want to consider some sort of throttle control for images.

If the event has 1 or two images, then inline is viable. If it is 3-10 images a separate gallery section makes sense but if it is 100 images, a hotlinked thumbnail contact sheet makes more sense.

If the count is totally out of control (100+ images), one representative image and a hyperlink to an external gallery might be the best choice. Or just the only option to avoid exhausting your printer’s ink cartridges or having a terabyte PDF file.

Thank you @jpschewe! To me, the hierarchy of the report could be this one:

  • person
    • details
    • events
      • event1
        • details
        • photos
      • event2
        • details
        • photos

In the meantime, if there are several or lots of photos, I do want them to be in the PDF, so that I can transmit the report to relatives.

Hope this helps :slight_smile:

When I looked at the report, I thought the following edit would address this:

In file detdescendantreporti.py . Edit this file around line 445 and add the 2 lines.

From:

   place = place_displayer.display_event(self.db, event)

   self.doc.start_paragraph('DDRI-MoreDetails')

To:

   place = place_displayer.display_event(self.db, event)
   if self.addimages:
       self.write_images(event.get_media_list())
   self.doc.start_paragraph('DDRI-MoreDetails')

I sent this to @alcofribas and it seemed to work for him. It looked reasonable for my reports too.

1 Like