Comments (2)
It's not a "bug", unfortunately.
draw.io
and similar tools are sadly known to be a source of trouble for SVG output (see also typst/typst#1421). The reason being that they don't really create a "pure" SVG, but instead they rely on the foreignObject
feature to embed HTML fragments into the SVG. As a result of this, you basically would need to have a full-blown browser engine to render their SVG, which we don't. And it's unlikely to ever be supported (because we rely on an upstream crate which is very unlikely to ever implement this, as it's not really part of the SVG specification).
Your SVG is basically saying "try to render this HTML fragment, and if this is not possible embed the image instead". For some reason, the two images have a different y position, which is also why they appear on a different height. That's not a bug from our side though, you can try opening the SVG in Inkscape (which doesn't support HTML either) and the result is exactly the same.
![image](https://private-user-images.githubusercontent.com/47084093/302319796-d8991abd-499f-4dd6-8b24-71c8c4a9814c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MjM3NzIsIm5iZiI6MTcyMTcyMzQ3MiwicGF0aCI6Ii80NzA4NDA5My8zMDIzMTk3OTYtZDg5OTFhYmQtNDk5Zi00ZGQ2LThiMjQtNzFjOGM0YTk4MTRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDA4MzExMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxZmQ1NzgwY2NlNDhhN2RjMDQxZWViM2MwOGUyZWRhYThhYzEwMTRlODZmMmUwMjEwYjYzNWUyMTQ0ZGVmNDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xQcG-aJi8IIQmKrl6GU8armr3ZOXdcx0Sswp7HZX7l0)
So I'm afraid there is not much we can do here. :( Other than blame draw.io
for not producing proper SVG files.
from svg2pdf.
Ah, that makes sense. Thank you so much for the explanation! I opened an issue over at drawio-desktop: jgraph/drawio#4473
from svg2pdf.
Related Issues (20)
- PDF content generated from SVG <pattern> jumps when zoom in/out in Safari HOT 3
- [feature] Shell completion
- CLI compilation error
- Weird behavior when embedding image in SVG and specifying width/height in a unit other than px HOT 1
- Example for `convert_tree_into` does not compile HOT 1
- Make converted SVGs use up less space
- Add support for the `spreadMethod` attribute in gradients
- no any text HOT 3
- Existing font ignored HOT 10
- Wavedrom diagram rendering issues (font, dotted lines) HOT 7
- Colors are not represented accurately
- More CLI options HOT 1
- `convert_tree_into` doesn't work HOT 2
- Error in `dpi_ratio` HOT 3
- CLI: Image transformation not being applied, and text not loading despite being system fonts HOT 11
- svg input differs to pdf output HOT 13
- Add support for better font fallback
- Improve file size when embedding CFF fonts
- Masked SVG rendered inconsistently
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svg2pdf.