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

Leanify removes spaces it shouldn't in .pptx #49

Closed
jul059 opened this issue Apr 28, 2019 · 2 comments
Closed

Leanify removes spaces it shouldn't in .pptx #49

jul059 opened this issue Apr 28, 2019 · 2 comments

Comments

@jul059
Copy link

jul059 commented Apr 28, 2019

Leanify removes spaces it shouldn't in the attached .pptx file. The title looks like this in the original:

image

And gets transformed to this with leanify on default settings:

image

This may be the result of poor formatting in the original document, but it is still a valid .pptx that was created by someone who was not specifically trying to find bugs in leanify.

MMD1019DiaposOligoéléments 2019 (2) - Copie - Copie.pptx

@JayXon
Copy link
Owner

JayXon commented Apr 30, 2019

Thanks for the report, this is an interesting one.

The issue is caused by a few <a:t> </a:t> in slide1.xml being minimized to <a:t/>, this is working as intended from xml perspective because xml:space="preserved" was not specified, so it should be safe to strip whitespaces. If PowerPoint was relying on the spaces for formating, then xml:space="preserved" should be added to the xml.

What's weird is that Word documents actually have xml:space="preserved" in their xml, so Leanify can detect it and not strip space in that case (details at #3), maybe Microsoft forgot to do this for PowerPoint? Does anyone know how to file a bug report for PowerPoint?

@jul059 Which PowerPoint version was used to create this document?

I probably can implement some workaround for this in Leanify, but I think this is actually PowerPoint's fault.

@jul059
Copy link
Author

jul059 commented Apr 30, 2019

@JayXon the original file was handed to me by a teacher, so I have no idea where it came from. It might have been originally a .ppt file that was later converted to .pptx, or perhaps it was a keynote file that was converted to .pptx since I'm studying in an environment where Apple products are the norm. I have no way of knowing unless there is some hidden information inside the original file that I can look for. Please tell me if there is.

I have used the latest PowerPoint for Windows (Version 1808 build 10730.20334 or 16.0.10730.20334) to create this new, single slide file by deleting every other slides.

You're right that it is probably PowerPoint's fault (or the converter's fault if it was originally in a different format). But since it is properly displayed by PowerPoint, it would seem that it may somehow "know" about it by displaying the spaces. It might therefore be an issue of PowerPoint's xml files not being strict xml files even though there is no mention of this anywhere. We've seen this with the old Internet Explorers where you would have to include a bunch of IE specific hacks to make sure the web page was displayed properly.

In any case, I think a workaround should be implemented even if a bug is fixed in PowerPoint since these faulty files already exist and are functional.

@JayXon JayXon closed this as completed in ae9ef9c May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants