added save to pdf operation/cleanup

This commit is contained in:
Kutaz 2023-01-09 14:08:41 -05:00
parent 00569026f5
commit f92dee1590

View file

@ -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, {