Replies: 1 comment 4 replies
-
It should be possible - its just a SVG so its easy to export in that sense. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could someone please provide an example of how to export a reflow diagram as a PDF file? It can be printed with "Save as PDF" selected, and the result is acceptable. However, it seems like there is little control over the layout of the results. My goal is to optimize the fit of the diagram (I'd like to export it on a single page with an optional header).
I've tried react-pdf, but I wasn't able to make it work. I was getting
element.setAttribute is not a function
; from the error stack output, it happened while react was attempting to render an svg element. I suspect it's because reaflow's<Canvas/>
is dependent on a bunch of hooks and react-pdf expects "static" component, but I'm not sure.There is an example on how to render svg in the react-pdf docs; I was wondering if it was possible to grab the outputted markup (as a ref, or with some native DOM method) and manually map the markup to the
<Svg />
,<G/>
, etc. components? But I haven't tried yet.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions