Amit Kumar

Amit Kumar

  • NA
  • 70
  • 6.2k

To Upload generated Pdf File in SharePoint Online library.

Aug 13 2019 12:51 AM
Hi SharePoint Developers,
I am facing a issue, when i am generating a pdf file fetch data from 5 saprate lists all data bind in particular format on html page after trigger a function formate download in pdf file.
using this code.. file download on system.
 
function generatePDF(temp)
   const element = document.getElementById("testdata");
   var opt = {
                  margin: .2,
                  filename: 'myfile.pdf',
                  image: { type: 'jpeg', quality: 0.98 },
                  html2canvas: { scale: 2 },
                  jsPDF: { unit: 'in', format: 'letter', orientation: 'landscape' }
               };
html2pdf().set(opt).from(element).save();
}
 
I want to save generated pdf automatic in Sharepoint online Library.....
 
Please give some solution for this as soon as posible..
 
Thankyou in Advance.. 

Answers (3)