Open billmorgan123 opened 2 years ago
live application are loaded in iframe in which i use this module and in catch block this "Unable to find element in cloned iframe" error occurred html2pdf?.() ?.set?.({ margin: 0, filename: 'invoice', image: { type: 'jpeg', quality: 0.98, }, enableLinks: true, html2canvas: { scale: 2, }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait', }, pagebreak: { mode: ['avoid-all', 'css', 'legacy'], }, }) ?.from?.(element) // ?.toPdf?.() ?.save?.() .then(()=>{ vm.$modal.hide(vm.modalName) }) .catch((ex)=>{ console.log('ex',ex) const html_to_pdf_overlay_els = document.getElementsByClassName('html2pdf__overlay') ?? [] for (let index = 0; index < html_to_pdf_overlay_els.length; index++) { const element = html_to_pdf_overlay_els[index]; if(element) element.parentNode.removeChild(element); } }) .finally(()=>{ complete() }) ?? complete();
html2pdf?.() ?.set?.({ margin: 0, filename: 'invoice', image: { type: 'jpeg', quality: 0.98, }, enableLinks: true, html2canvas: { scale: 2, }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait', }, pagebreak: { mode: ['avoid-all', 'css', 'legacy'], }, }) ?.from?.(element) // ?.toPdf?.() ?.save?.() .then(()=>{ vm.$modal.hide(vm.modalName) }) .catch((ex)=>{ console.log('ex',ex) const html_to_pdf_overlay_els = document.getElementsByClassName('html2pdf__overlay') ?? [] for (let index = 0; index < html_to_pdf_overlay_els.length; index++) { const element = html_to_pdf_overlay_els[index]; if(element) element.parentNode.removeChild(element); } }) .finally(()=>{ complete() }) ?? complete();
I face this error also. Do you know how to solve it? @billmorgan123
live application are loaded in iframe in which i use this module and in catch block this "Unable to find element in cloned iframe" error occurred
html2pdf?.() ?.set?.({ margin: 0, filename: 'invoice', image: { type: 'jpeg', quality: 0.98, }, enableLinks: true, html2canvas: { scale: 2, }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait', }, pagebreak: { mode: ['avoid-all', 'css', 'legacy'], }, }) ?.from?.(element) // ?.toPdf?.() ?.save?.() .then(()=>{ vm.$modal.hide(vm.modalName) }) .catch((ex)=>{ console.log('ex',ex) const html_to_pdf_overlay_els = document.getElementsByClassName('html2pdf__overlay') ?? [] for (let index = 0; index < html_to_pdf_overlay_els.length; index++) { const element = html_to_pdf_overlay_els[index]; if(element) element.parentNode.removeChild(element); } }) .finally(()=>{ complete() }) ?? complete();