One image but multiple frame with it?

Hello,
I have one image in data i’d like to used multiple times in my odt template but it seems multiple frame can’t have same name. (its work on first frame of course because she has right name)

I don’t know in advance how many times this image will be used, I provide data to my users and they make their model. So they should be able to use the image several times in their model.

So how i do ? (I use LibreOffice 7.0.5)

Is there a real documentation, list of possible key words … ?

Regards

Indeed the frame name is a reference according to the documentation: OASIS Open Document Format for Office Applications (OpenDocument) Version 1.2 - Part 1: OpenDocument Schema
But there are no other attribute that can filled using the UI.
But indeed relatorio should not crash if a tuple of 5 value is used instead of 4. It will just ignore the 5th value. So I guess you could use the 5th value to make the expression unique.

currently I write the name of my frame like this:

image: o.img.code39

If I want to try what you propose, what is the syntax, what is the 3rd and 4th value?

I tried to duplicate one frame with loop for but it doesn’t work too

Regards

2nd image with active for loop

The 2nd is the mimetype which can be left as '' to keep the guessing.
The 3rd and 4th are the width and height which can be left as None to keep existing size.

Sorry but i still ask for syntax

I tried this (see screenshot) and i get “list index out of range”

Python :
data[‘img’][‘code39’] = (open(join(Constants.cst_path_tmp, imgcode39_name), ‘rb’), ‘image/png’)

In LibreOffice:
frame_name

Regards

Ok i fix this by

Pyhon
data[‘img’][‘code39’] = open(join(Constants.cst_path_tmp, imgcode39_name), ‘rb’)

In LibreOffice:
image: (o.img.code39, ‘image/png’, None, None, 1)

test_2_frame_with_same_img

Thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.