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

Image resizing does not work with pptx #4586

Open
stupidus89 opened this issue Apr 23, 2018 · 1 comment
Open

Image resizing does not work with pptx #4586

stupidus89 opened this issue Apr 23, 2018 · 1 comment

Comments

@stupidus89
Copy link

@stupidus89 stupidus89 commented Apr 23, 2018

When specifing the size of an image e.g. with {width=2cm}, then using pandoc to generate a powerpoint file, the resulting pptx file always shows an image that fills the slide. This also means, that only one image fits on a slide.
Exporting the same markdown file to docx works without any problem:

# Test
![](test-img.png){width=5cm}
![](test-img.png){width=2cm}

I use pandoc 2.1.3 on Windows 10 and used the following commands:
pandoc -f markdown test.md -o test.docx
pandoc -f markdown test.md -o test.pptx

This is a screenshot of the resulting pptx:
powerpoint
This is a screenshot of the resulting docx (and what the pptx should look like):
word

I attached the source file and the resulting word and powerpoint files:
test.zip

@jkr
Copy link
Collaborator

@jkr jkr commented Apr 24, 2018

This has to be better documented, but at the moment, there isn't image resizing. Partially this is because images are already dynamically resized to fit into powerpoint templates, and there isn't agreement about how resizing should fit on top of that. This is on the TODO list, but there's some principle of least surprise issues that need to be discussed on the mailing list.

I'll leave this open to remind us that this is still to be done.

Note, though, that even with resizing, it is not possible to put two images on the same slide unless you use two-column layout. Unlike docx, which has a flowed model, powerpoint has an entirely visual model, with stacked frames, based on templates. We can't place an arbitrary number of shapes on the same slide unless we want them to overlap. (In sum, there are limitations to dynamic slide creation -- we can only reliably work in terms of layout.)

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

No branches or pull requests

3 participants