Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Export threat model to image/HTML/PDF #8

Closed
Glavin001 opened this issue Sep 3, 2014 · 13 comments
Closed

Export threat model to image/HTML/PDF #8

Glavin001 opened this issue Sep 3, 2014 · 13 comments

Comments

@Glavin001
Copy link
Contributor

[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.

@Frozenfire92
Copy link
Contributor

This would be useful for anyone wishing to print their diagrams, as it would be easier to share an exported file for online usage

@Glavin001
Copy link
Contributor Author

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.

@MatKallada
Copy link
Contributor

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

@Glavin001 Glavin001 changed the title Export as Image Export threat model or Reports to an image file Sep 17, 2014
@Glavin001 Glavin001 added this to the Final Release & Project Evaluation milestone Sep 17, 2014
@MatKallada MatKallada self-assigned this Sep 24, 2014
@MatKallada
Copy link
Contributor

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?

@Glavin001
Copy link
Contributor Author

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.

@MatKallada
Copy link
Contributor

I'll throw a new issue for generating reports. #30

@MatKallada MatKallada changed the title Export threat model or Reports to an image file Export threat model to image/html/pdf Sep 28, 2014
@MatKallada MatKallada changed the title Export threat model to image/html/pdf Export threat model to image/HTML/PDF Sep 28, 2014
@Glavin001 Glavin001 assigned Glavin001 and unassigned MatKallada Dec 18, 2014
@Glavin001
Copy link
Contributor Author

@Glavin001
Copy link
Contributor Author

Using html2canvas to render and Canvas-to-Blob to download:
export-image

Notice how it omits the connections/flows between the elements.

@Glavin001
Copy link
Contributor Author

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!

SeaSponge UI

image

Exported Image

untitled diagram 6

@Glavin001
Copy link
Contributor Author

Currently some of the layers are rendered out of order.

@Pana
Copy link

Pana commented Mar 30, 2015

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

@Glavin001
Copy link
Contributor Author

Thanks for letting us know, @Pana. I think we can migrate these into a separate bug Issue.

@Pana
Copy link

Pana commented Apr 9, 2015

I have try canvg on IE11, but it didn't work on it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants