mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 15:25:01 -04:00
added save to pdf operation/cleanup
This commit is contained in:
parent
00569026f5
commit
f92dee1590
1 changed files with 7 additions and 2 deletions
|
@ -508,6 +508,11 @@ class OutputWaiter {
|
||||||
saveClick() {
|
saveClick() {
|
||||||
this.downloadFile();
|
this.downloadFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for save to pdf events
|
||||||
|
* Saves the current output to a file.
|
||||||
|
*/
|
||||||
savetopdf() {
|
savetopdf() {
|
||||||
this.downloadPdf();
|
this.downloadPdf();
|
||||||
}
|
}
|
||||||
|
@ -544,7 +549,7 @@ class OutputWaiter {
|
||||||
|
|
||||||
const data = await dish.get(Dish.HTML);
|
const data = await dish.get(Dish.HTML);
|
||||||
//console.log(data, "this is our html")
|
//console.log(data, "this is our html")
|
||||||
var doc = new jsPDF('p', 'px', 'a4');
|
const doc = new jsPDF('p', 'px', 'a4');
|
||||||
|
|
||||||
const width = doc.internal.pageSize.getWidth();
|
const width = doc.internal.pageSize.getWidth();
|
||||||
doc.html(data, {
|
doc.html(data, {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue