Diagrams do not render correctly (SVG / PNG)
laingsimon opened this issue · 3 comments
laingsimon commented
Draw.io offloads PDF rendering to a webservice, https://exp-pdf.draw.io/ImageExport4/export, it may be possible to re-use this - or identify how it works to achieve the same result in-house.
Reproduction steps
http://localhost:8080/?url=https://laingsimon.github.io/render-diagram/Sample%20file.xml&format=png
actual | expected |
---|---|
![]() |
![]() |
POST https://exp-pdf.draw.io/ImageExport4/export HTTP/1.1
Host: exp-pdf.draw.io
Content-Type: application/x-www-form-urlencoded
format=png&allPages=1&bg=none&base64=0&embedXml=0&xml=<url encoded file content>
This method works for PDF & PNG exports, but doesn't support SVG
laingsimon commented
Java renderer now offloads PNG rendering to the ImageExport4 service however isn't able to do so for svg formatted images.
Options are:
- update ImageExport4 via a pull request to JGraph
- create a nodejs app to render the images in SVG format where requested - could easily be a fork of the ImageExport4 product
sl-slaing commented
Issue raised to consider the introduction of a svg renderer in ImageExport4
laingsimon commented