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

SVG AddPicture: Non-square logos without width/height attributes are sized as squares #687

Closed
jcoliz opened this issue May 16, 2024 · 0 comments · Fixed by #691
Closed

Comments

@jcoliz
Copy link
Contributor

jcoliz commented May 16, 2024

  1. Create an SVG image which is wider than it is tall
  2. Ensure it has no width or height attributes on the svg tag
  3. Add it to a new slide, using ShapeCrawler
  4. Load the resulting slide into PowerPoint
  5. Notice that the shape is square, so the image is squished horizontally
  6. Now with PowerPoint open, import that SVG manually
  7. Notice that the resulting size matches the viewbox attribute, so PowerPoint inferred the size from that

More on this: If the SVG doesn't even have a viewbox attribute, PowerPoint will use 500x500 pixels. That's probably not what user wants, but at least user can SEE something.

jcoliz added a commit to jcoliz/ShapeCrawler that referenced this issue May 19, 2024
jcoliz added a commit to jcoliz/ShapeCrawler that referenced this issue May 19, 2024
And enable AddPicture_adds_svg_picture_no_width_height_tags which passes now.

Fixes ShapeCrawler#687
jcoliz added a commit to jcoliz/ShapeCrawler that referenced this issue May 19, 2024
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

Successfully merging a pull request may close this issue.

1 participant