From 9bcbed8928643e36a36b48f7f4498c61e9bc7440 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 23 Apr 2020 17:46:08 +0300 Subject: [PATCH] add page cache pdf files --- app/modules/anpdf/anpdf.php | 2 +- scripts/splitpdf.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/anpdf/anpdf.php b/app/modules/anpdf/anpdf.php index 4e77503..d139cc9 100644 --- a/app/modules/anpdf/anpdf.php +++ b/app/modules/anpdf/anpdf.php @@ -41,7 +41,7 @@ function read_kuri($hash, $page = 1, $scale = 1.5, $promo = false){ } $namefile = $hash.'.pdf'; - $cachefile = PDFDIR.$namefile; + $cachefile = PDFDIR.$hash.'-'.$page.'.pdf'; if (file_exists($cachefile)){ $pdfile = '/'.$namefile; diff --git a/scripts/splitpdf.sh b/scripts/splitpdf.sh index 83a2110..c206bb6 100644 --- a/scripts/splitpdf.sh +++ b/scripts/splitpdf.sh @@ -31,7 +31,7 @@ for file in $f; -v "$OUTDIR:/workdir/pages" \ -w "/workdir" \ masterforweb/pdftk pdftk "pdf/$file" burst output "pages/${name}/${name}-%1d.pdf"; - echo "add $name done"; + echo "$name done"; fi