I have this function in html page header in oracle apex 20.1 (Downloading PL/SQL dynamic content region)
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
<script type="text/javascript">
function downloadFile(receiptId) {
var element = document.getElementById('content');
if (element) {
var opt = {
margin: 1,
filename: receiptId +'.pdf',
image: { type: 'jpeg', quality: 0.98},
html2canvas: { scale: 5 },
jsPDF: { unit: 'mm', format: 'A4', orientation: 'portrait' }
};
html2pdf().from(element).set(opt).save().then(function() {
console.log('PDF downloaded successfully');
}).catch(function(err) {
console.error('Error generating PDF:', err);
});
} else {
console.error("Content element not found.");
}
}
</script>
Any how here the file downloading and storing in downloaded files in the system .But I want store the downloaded files into c drive how to do ?