Skip to content
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

Cannot render multiple images in a pptx table #1036

Open
illianechesa opened this issue Mar 1, 2023 · 6 comments
Open

Cannot render multiple images in a pptx table #1036

illianechesa opened this issue Mar 1, 2023 · 6 comments
Labels

Comments

@illianechesa
Copy link

I found out that it is currently not possible to use a PPTX image inside multiple rows in a PPTX table.

For example:
image

Here I would expect the image in the middle to repeat in every row. Also the same for the last image (3rd column). However, I cannot achieve this behaviour.

This is the result:
image

@bjrmatos
Copy link
Collaborator

bjrmatos commented Mar 1, 2023

yes, it is currently not supported, the images need to be treated a bit differently in the loop. can you provide the template? it will be easier for us to make this work if you can provide the same template and data, basically an example we can use.

we are currently working on other things related to the docx, so it may take a bit to start the work on this, FYI.

@illianechesa
Copy link
Author

As far as I saw, it is more of a problem with PowerPoint itself. It does treat images and tables as independent objects, so you cannot really bind an image to a specific cell. The same happens with lists. Here is the template: https://playground.jsreport.net/w/illianechesa/fUhgg9Mv

@bjrmatos
Copy link
Collaborator

bjrmatos commented Mar 1, 2023

good point, we will check it and see what we can do about it, thanks

@pofider pofider added the todo label Mar 23, 2023
@bjrmatos
Copy link
Collaborator

we have reviewed this, however because the limitation of the pptx format, this is not possible the image will always be floating and generating them from a loop has a big problem, we don't have a reliable way to position the images that are generated from the loop, doing it requires knowledge around the actual dimensions of the slide and rest of content in it, and such information is only available at runtime when you open a pptx file in a editor app (like PowerPoint)

we don't have a solution for this, but we will keep this open and review it again in the future if some new arguments pops up

@illianechesa
Copy link
Author

we have reviewed this, however because the limitation of the pptx format, this is not possible the image will always be floating and generating them from a loop has a big problem, we don't have a reliable way to position the images that are generated from the loop, doing it requires knowledge around the actual dimensions of the slide and rest of content in it, and such information is only available at runtime when you open a pptx file in a editor app (like PowerPoint)

we don't have a solution for this, but we will keep this open and review it again in the future if some new arguments pops up

as a workaround, there is the option to bind an image to the background of a cell, I think this could be a partial "solution"

@bjrmatos
Copy link
Collaborator

@illianechesa we also considered that approach but we are not yet convinced that it should work like this, we decided to wait for more feature requests/comments before pushing an implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants