Export Diagram SVG at Server Side #1439
-
Hello, Is there a way to export SVG of the edited diagram at server side? I'm currently working with a standalone implementation based on node.js If there's no direct way to do this, can you guide me from where I can start? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @giuliano-marinelli, Currently, the SVG can only be created properly on the client side as all the view rendering (where GModel elements are translated into SVG) is done there. There are already actions that deal with the SVG export, mainly In our standalone workflow example, we use the standalone export module to allow the user to hit I'd assume that you can do something similar:
|
Beta Was this translation helpful? Give feedback.
-
Hi @martin-fleck-at I was trying to instantiate a GLSP client in server side but can't do it because of webpack css imports (I'm not using webpack in backend). |
Beta Was this translation helpful? Give feedback.
Hello @giuliano-marinelli,
Currently, the SVG can only be created properly on the client side as all the view rendering (where GModel elements are translated into SVG) is done there. There are already actions that deal with the SVG export, mainly
RequestExportSvgAction
to trigger the SVG export from the client or the server and theExportSvgAction
which is then sent out with the generated SVG string.In our standalone workflow example, we use the standalone export module to allow the user to hit
Ctrl+Shift+E
to export the current diagram as SVG to a file calleddiagram.svg
. The actual saving to a file happens in the ExportSvgActionHandler which handles theExportSvgAction
.I'd assume that…