Closed Glavin001 closed 9 years ago
This would be useful for anyone wishing to print their diagrams, as it would be easier to share an exported file for online usage
I don't think printing is necessarily an issue and enabled by this. Could we not just use the web browser's printing of the webpage? We don't really need to do all the steps in: draw threat model --> generate image --> print image
.
Also, we could use PhantomJS for rendering jsPlumb's drawing to an image.
We should be able to export jsPlumb drawings using CanVG as described through the following article: http://benfelda.blogspot.ca/2014/01/jsplumb-to-image-and-thumb.html
I could understand why someone would want to export a diagram to an image file, but why would anyone want to export a security report to an image file?
I agree. I suppose for the case of the report it really should be export to PDF or similar file formats. Unfortunately PDF.js only reads PDF files. We could render the report to an HTML webpage and then the web browser could handle the exporting to PDF -- I usually go to Print to File.
I'll throw a new issue for generating reports. #30
Using html2canvas to render and Canvas-to-Blob to download:
Notice how it omits the connections/flows between the elements.
Using a combination of HTML2Canvas and CanVG I was able to get full support for rendering to a canvas and using CanvasToBlob we can download it!
Currently some of the layers are rendered out of order.
In my situation the color is a little different as the jsplumb chart and some css effect is not render normally such as the dotted border: 1px dotted gray , this may the issue of html2canvas
Thanks for letting us know, @Pana. I think we can migrate these into a separate bug Issue.
I have try canvg on IE11, but it didn't work on it
[Easy] The user may want to export an image of the threat model itself for presentation purposes. The user will be able to set the resolution or page size preferences upon export or print. With jsPlumb this should be fairly easy to add.