// 2. Create a new document
var doc = new jsPDF();
var img = new Image();
img.src = 'https://i.imgur.com/6jH1z7R.png’;
doc.addImage(img, 'PNG’, 10, 10, 40, 40);
doc.setFontSize(20);
doc.text(100, 20, 'This is a title’);
doc.setFontSize(15);
doc.text(20, 30, 'This is some normal sized text underneath.’);
doc.setFontSize(10);
doc.text(20, 40, 'This is some smaller text underneath.’);
doc.save(’mySampleFile.pdf’);
}
//Function to handle the click on the download button
handleDownload = (event) => {
event.preventDefault();
const doc = new jsPDF();
doc.text(„This is a text”, 10, 10);
doc.save(„a4.pdf”);
}
//Function to handle the click on the download button
handleDownload = (event) => {
event.preventDefault();
const doc = new jsPDF();
doc.text(„This is a text”, 10, 10);
doc.save(„a4.pdf”);
}
render() {
return (
);
}
}
export default App;
Ankerkraut GmbHReindorfer Osterberg 75
21266 Jesteburg
