JSPDF问题 - 图像渲染
我正在使用 JSPDF库来生成带有4张图像的MRI报告。每当提交给服务器的请求时,这些图像都会保存到指定的目录中,他们在每个请求时都会更改。
将它们从目录渲染到报告时,第一个请求的图像不是新请求的图像。 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`);
}
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`);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论