mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 15:25:01 -04:00
code cleaning
This commit is contained in:
parent
f92dee1590
commit
eaf61a07df
1 changed files with 6 additions and 10 deletions
|
@ -536,6 +536,9 @@ class OutputWaiter {
|
|||
FileSaver.saveAs(file, fileName, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for file download as pdf events.
|
||||
*/
|
||||
async downloadPdf() {
|
||||
const dish = this.getOutputDish(this.manager.tabs.getActiveOutputTab());
|
||||
if (dish === null) {
|
||||
|
@ -549,24 +552,17 @@ class OutputWaiter {
|
|||
|
||||
const data = await dish.get(Dish.HTML);
|
||||
//console.log(data, "this is our html")
|
||||
const doc = new jsPDF('p', 'px', 'a4');
|
||||
const doc = new jsPDF("p", "px", "a4");
|
||||
|
||||
const width = doc.internal.pageSize.getWidth();
|
||||
doc.html(data, {
|
||||
autoPaging: 'text',
|
||||
autoPaging: "text",
|
||||
width: width,
|
||||
windowWidth: width,
|
||||
callback: function (doc) {
|
||||
doc.save(fileName);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue