From 4680b89e82c12717b8e6d7895732efef1ff2982e Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Wed, 9 Oct 2024 13:27:54 +0200 Subject: [PATCH] Build with reduced jsPDF Let inject jsroot.js into batch canvas file --- build/jsroot.js | 102 +---------------------------------------------- modules/core.mjs | 2 +- 2 files changed, 2 insertions(+), 102 deletions(-) diff --git a/build/jsroot.js b/build/jsroot.js index ecf717797..2cd0316c8 100644 --- a/build/jsroot.js +++ b/build/jsroot.js @@ -12,7 +12,7 @@ const version_id = 'dev', /** @summary version date * @desc Release date in format day/month/year like '14/04/2022' */ -version_date = '8/10/2024', +version_date = '9/10/2024', /** @summary version id and date * @desc Produced by concatenation of {@link version_id} and {@link version_date} @@ -107755,9 +107755,6 @@ function jsPDF(options) { * 'bloburi'/'bloburl' -> (string)
* 'datauristring'/'dataurlstring' -> (string)
* 'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring
- * 'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)
- * 'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)
- * 'pdfjsnewwindow' -> (wind | null) * @param {Object|string} options An object providing some additional signalling to PDF generator.
* Possible options are 'filename'.
* A string can be passed instead of {filename:string} and defaults to 'generated.pdf' @@ -107824,103 +107821,6 @@ function jsPDF(options) { ";base64," + dataURI ); - case "pdfobjectnewwindow": - if ( - Object.prototype.toString.call(globalObject) === "[object Window]" - ) { - var 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 = - "" + - '"; - var nW = globalObject.open(); - - if (nW !== null) { - nW.document.write(htmlForNewWindow); - } - return nW; - } else { - throw new Error( - "The option pdfobjectnewwindow just works in a browser-environment." - ); - } - case "pdfjsnewwindow": - if ( - Object.prototype.toString.call(globalObject) === "[object Window]" - ) { - var pdfJsUrl = options.pdfJsUrl || "examples/PDF.js/web/viewer.html"; - var htmlForPDFjsNewWindow = - "" + - "" + - '' + - ""; - var dataURLNewWindow = globalObject.open(); - if (dataURLNewWindow !== null) { - dataURLNewWindow.document.write(htmlForDataURLNewWindow); - dataURLNewWindow.document.title = options.filename; - } - if (dataURLNewWindow || typeof safari === "undefined") - return dataURLNewWindow; - } else { - throw new Error( - "The option dataurlnewwindow just works in a browser-environment." - ); - } - break; case "datauri": case "dataurl": return (globalObject.document.location.href = this.output( diff --git a/modules/core.mjs b/modules/core.mjs index 2b2354293..87e596b1d 100644 --- a/modules/core.mjs +++ b/modules/core.mjs @@ -4,7 +4,7 @@ const version_id = 'dev', /** @summary version date * @desc Release date in format day/month/year like '14/04/2022' */ -version_date = '8/10/2024', +version_date = '9/10/2024', /** @summary version id and date * @desc Produced by concatenation of {@link version_id} and {@link version_date}