From 35450546d9a6694519e6d0581e51d3e5ba8cd51b Mon Sep 17 00:00:00 2001 From: sysadminstory Date: Thu, 27 Jan 2022 23:29:01 +0100 Subject: [PATCH 1/2] Fix PDF reader data saving Saving data for ePub File is fixed by updating the base path taken as reference. --- templates/pdfreader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pdfreader.php b/templates/pdfreader.php index fc77698..5e7bf20 100644 --- a/templates/pdfreader.php +++ b/templates/pdfreader.php @@ -28,7 +28,7 @@ ?> - +' data-scope='' data-cursor='' data-defaults='' data-preferences='' data-metadata='' data-annotations=''> From c777a4b518ebbace20058f1a2c0e7db890dc6ba0 Mon Sep 17 00:00:00 2001 From: sysadminstory Date: Thu, 27 Jan 2022 23:56:57 +0100 Subject: [PATCH 2/2] Change to make work PDF reader using a cusomer app folder Move the loading of the 'pdf.worker.js' file from ready.js to pdfreader.php --- js/ready.js | 3 ++- templates/pdfreader.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ready.js b/js/ready.js index 721c1df..421279d 100644 --- a/js/ready.js +++ b/js/ready.js @@ -145,7 +145,8 @@ document.onreadystatechange = function () { function renderPdf(file, options) { PDFJS.filePath = "vendor/pdfjs/"; PDFJS.imageResourcesPath = "vendor/pdfjs/css/images/"; - PDFJS.workerSrc = options.session.basePath + 'vendor/pdfjs/lib/pdf.worker.js'; + // This file is loaded using the HTML template instead + // PDFJS.workerSrc = options.session.basePath + 'vendor/pdfjs/lib/pdf.worker.js'; var reader = pdfReader(file, options); } diff --git a/templates/pdfreader.php b/templates/pdfreader.php index 5e7bf20..4de36d8 100644 --- a/templates/pdfreader.php +++ b/templates/pdfreader.php @@ -43,6 +43,7 @@ +