I'm facing a challenge where I need to create a custom quote in pdf using data retrieved in JavaScript and sent in HTML. However, the issue is that no library supports CSS for the PDF generation process. After some research, I came across HTML2CANVAS as a potential solution, but it only returns the output as an image, which is not what I want.
document.getElementById('generationPdf').onclick = e =>{
e.preventDefault()
if (index + 1 === 1) {
let folder_id = document.location.pathname.substring(8)
let objectForDevis = arrayObject[0]
axios({
method: 'post',
url: folder_id+'/generate-pdf',
data: {
objectForDevis
}
}).then(function (response) {
if (response) {
}
});
}
}