I am using jsPDF library to generate a MRI report with 4 images. Every time a request submitted to a server, these images are saved to a specified directory and they are changing with each request.
when rendering them from the directory to the report, the images from the first request is rendered not the new ones. Is there a type of caching in jsPDF ?
generateMRIReport(patientNumber){
window.jsPDF = window.jspdf.jsPDF;
const MRI_REPORT = new jsPDF();
MRI_REPORT.addImage(`WEB-INF/media/testing_mods_${patientNumber}.png`, 'PNG', 5, 80, 196, 70);
MRI_REPORT.addImage(`WEB-INF/media/testing_preds.png_${patientNumber}.png`, 'PNG', 5, 160, 196, 70);
MRI_REPORT.save(`NEUROPH_${patientNumber}_MRI_REPORT.pdf`);
}