Added printing + Resume name input
This commit is contained in:
13
resources/js/lib/pdfExport.ts
Normal file
13
resources/js/lib/pdfExport.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { jsPDF } from "jspdf";
|
||||
|
||||
export function exportToPdf(element: HTMLElement, name: string) {
|
||||
const pdf = new jsPDF();
|
||||
|
||||
pdf.html(element, {
|
||||
callback: function (doc) {
|
||||
doc.save(name);
|
||||
},
|
||||
width: 210,
|
||||
windowWidth: element.scrollWidth,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user