diff --git a/src/jspdf.js b/src/jspdf.js index 66ff8ec26..d626c279a 100644 --- a/src/jspdf.js +++ b/src/jspdf.js @@ -3093,13 +3093,22 @@ function jsPDF(options) { Object.prototype.toString.call(globalObject) === "[object Window]" ) { var pdfObjectUrl = - options.pdfObjectUrl || "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js"; + var integrity = + ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"'; + + if (options.pdfObjectUrl) { + pdfObjectUrl = options.pdfObjectUrl; + integrity = ""; + } + var htmlForNewWindow = "" + '