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

SVGs imported into PowerPoint are missing icons included via URLs #1849

Open
MLNW opened this issue Feb 27, 2024 · 5 comments
Open

SVGs imported into PowerPoint are missing icons included via URLs #1849

MLNW opened this issue Feb 27, 2024 · 5 comments

Comments

@MLNW
Copy link

MLNW commented Feb 27, 2024

When I drop the SVG of a diagram including icons into PowerPoint the icons themselves are missing. Here is an example diagram:

classes: {
  container_image: {
    shape: image
    icon: https://icon.icepanel.io/Technology/svg/Podman.svg
  }
  users: {
    shape: image
    icon: https://icons.terrastruct.com/essentials%2F359-users.svg
  }
}

image: Container Image {
  class: container_image
}

users: Users {
  class: users
}

image <- users
Expected Actual
image image
VS code, Firefox ... PowerPoint
d2 --version
v0.6.3
@cyborg-ts cyborg-ts added this to D2 Feb 27, 2024
@zachcp
Copy link

zachcp commented Mar 12, 2024

See also #1853

@alixander
Copy link
Collaborator

alixander commented Apr 18, 2024

@MLNW I can't reproduce. I exported to ppt and this is result:

Screenshot 2024-04-17 at 7 44 06 PM

Am I misunderstanding the issue? Do you mean you made an SVG with D2 and then imported that SVG into a ppt? If so, you can pass arg "--bundle" to inline the images into the data, which should work everywhere.

@MLNW
Copy link
Author

MLNW commented Apr 18, 2024

Yes, I used the VS Code Extension to export the diagram as SVG and then imported that into PowerPoint. How would I use the --bundle parameter in VS Code?

@alixander
Copy link
Collaborator

Hm VSCode extension needs to support the option. Can you file this issue in https://github.com/terrastruct/d2-vscode/issues ?

@MLNW
Copy link
Author

MLNW commented Jul 16, 2024

I just tried to use the work around via --bundle that you proposed. It leads to the same result. I also saw that the CLI already defaults to use bundle.

❯ d2
d2 v0.6.5
Usage:
...

Flags:
...
  -b, --bundle                 $D2_BUNDLE            when outputting SVG, bundle all assets and layers into the output file (default true)
...

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

No branches or pull requests

3 participants