]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5408 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 Aug 2022 10:51:39 +0000 (12:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 Aug 2022 10:51:39 +0000 (12:51 +0200)
.docker/images/php/Dockerfile
.gitignore
app/Jobs/FluidbookCompiler.php
app/Models/FluidbookPublication.php
composer.lock

index 11ff1229ad96b3a932e20e4cf5a7a74cbc1bf01d..9aff1f6c5de21d46b639cc6eb26c247ffaf6f691 100644 (file)
@@ -75,7 +75,7 @@ RUN apt-get -y --no-install-recommends install nodejs google-chrome-stable
 RUN apt-get -y --no-install-recommends install sudo
 RUN apt-get -y --no-install-recommends install supervisor ssh rsync
 RUN apt-get -y --no-install-recommends install nsis
-RUN apt-get -y --no-install-recommends install default-jre pdftk poppler-utils ghostscript imagemagick netpbm libjpeg-turbo8
+RUN apt-get -y --no-install-recommends install default-jre pdftk poppler-utils ghostscript imagemagick netpbm libjpeg-turbo8 libjpeg-turbo-progs
 RUN apt-get -y --no-install-recommends install zip unzip gzip 7zip
 RUN apt-get -y --no-install-recommends install icoutils fontforge
 RUN apt-get -y --no-install-recommends install ffmpeg python3 lame
index a82927384979418565ab7b4342e9a945abc50186..665cbf57248bd7c4f991e563afa1f55f0d5548fc 100644 (file)
@@ -2,6 +2,7 @@
 /public/hot
 /public/storage
 /storage/*.key
+/storage/fluidbook
 /vendor
 /.env
 /.env.backup
index 864d06616dcc3044131c0ea0301b1760baf90a41..bbc3e3f0f35121b5a9c16becc5a37fd9b506cce7 100644 (file)
@@ -1973,7 +1973,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
     protected function writeScorm()
     {
         $manifestfiles = ['1.2' => '_imsmanifest.12.xml', '2004' => '_imsmanifest.2004.xml', '2004.3' => '_imsmanifest.2004-3.xml'];
-        $manifestfile = $manifestfiles[$this->fluidbookSettings->scorm_version];
+        $manifestfile = $manifestfiles[(string)$this->fluidbookSettings->scorm_version];
 
         $manifest = file_get_contents($this->assets . '/' . $manifestfile);
         if (!$this->fluidbookSettings->scorm_title) {
@@ -3991,6 +3991,11 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 
     public function page_path($page, $path = ''): string
     {
-        // TODO: Implement page_path() method.
+        return '';
+    }
+
+    public function getPagePDFSource($page): string
+    {
+        return $this->getFluidbook()->getPDFSplitSource($page);
     }
 }
index 40d42edd3454ce7a6bbcf41ec7cfc8ec2a6c59d0..bef94b1510b95362594a117304816db157e7c4f4 100644 (file)
@@ -195,6 +195,17 @@ class FluidbookPublication extends ToolboxSettingsModel
         return self::_getDocument($compo[0])->getHightlightFile($compo[1]);
     }
 
+    public function getPDFSplitSource($page)
+    {
+        $compo = $this->composition[$page];
+        $doc = self::_getDocument($compo[0]);
+        $pdf = $doc->path('pdf/p' . $compo[1] . '.pdf');
+        if (!file_exists($pdf)) {
+            $doc->splitPDF();
+        }
+        return $pdf;
+    }
+
 
     public function getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html', $force = false)
     {
@@ -298,9 +309,12 @@ class FluidbookPublication extends ToolboxSettingsModel
     public function getPDFSource($page, $type = 'crop'): string
     {
         $compo = $this->composition[$page];
-        return self::_getDocument($compo[0])->getPDFSource($type);
+        if ($type == 'crop') {
+            return self::_getDocument($compo[0])->getPDFSource($type);
+        }
     }
 
+
     /**
      * @return array
      */
index 8a256eb725519e8c352214c6554a557037ce5d6b..636eac11b08c16b2cab5f3d1e35736ad8fbc2eb7 100644 (file)
             "source": {
                 "type": "git",
                 "url": "git://git.cubedesigners.com/cubist_cms-back.git",
-                "reference": "2c48fbe4583d0e84a5c06ee4db3598e87f8b0aa4"
+                "reference": "85df36ce91c653da39fc2370d53c69b5b036efea"
             },
             "dist": {
                 "type": "tar",
-                "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-3796f6.tar",
-                "reference": "2c48fbe4583d0e84a5c06ee4db3598e87f8b0aa4",
-                "shasum": "295d6e05cb9cca00b9a43a2acd5c149032ceab2d"
+                "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-cbd892.tar",
+                "reference": "85df36ce91c653da39fc2370d53c69b5b036efea",
+                "shasum": "eae454cb5cd26fd6959ee4927a8a25ca3dd79e1d"
             },
             "require": {
                 "backpack/backupmanager": "^3.0",
                 }
             ],
             "description": "Cubist Backpack extension",
-            "time": "2022-08-28T11:29:23+00:00"
+            "time": "2022-08-31T09:44:48+00:00"
         },
         {
             "name": "cubist/cms-front",
         },
         {
             "name": "doctrine/dbal",
-            "version": "3.4.2",
+            "version": "3.4.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/dbal.git",
-                "reference": "22de295f10edbe00df74f517612f1fbd711131e2"
+                "reference": "a24b89d663d8f261199bc0a91c48016042ebda85"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/22de295f10edbe00df74f517612f1fbd711131e2",
-                "reference": "22de295f10edbe00df74f517612f1fbd711131e2",
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/a24b89d663d8f261199bc0a91c48016042ebda85",
+                "reference": "a24b89d663d8f261199bc0a91c48016042ebda85",
                 "shasum": ""
             },
             "require": {
                 "psr/log": "^1|^2|^3"
             },
             "require-dev": {
-                "doctrine/coding-standard": "9.0.0",
-                "jetbrains/phpstorm-stubs": "2022.1",
+                "doctrine/coding-standard": "10.0.0",
+                "jetbrains/phpstorm-stubs": "2022.2",
                 "phpstan/phpstan": "1.8.2",
                 "phpstan/phpstan-strict-rules": "^1.3",
                 "phpunit/phpunit": "9.5.21",
             ],
             "support": {
                 "issues": "https://github.com/doctrine/dbal/issues",
-                "source": "https://github.com/doctrine/dbal/tree/3.4.2"
+                "source": "https://github.com/doctrine/dbal/tree/3.4.3"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-08-21T14:21:06+00:00"
+            "time": "2022-08-28T17:26:36+00:00"
         },
         {
             "name": "doctrine/deprecations",
             "source": {
                 "type": "git",
                 "url": "git://git.cubedesigners.com/fluidbook_tools.git",
-                "reference": "85a2d6b49d391c9f32c9c693cadae68e51c06d24"
+                "reference": "48b6b104cedc5d6720adfc04956d3f2ceb787230"
             },
             "dist": {
                 "type": "tar",
-                "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-f6b05f.tar",
-                "reference": "85a2d6b49d391c9f32c9c693cadae68e51c06d24",
-                "shasum": "ea5c6799158a02b93860d358ab2185fc47870ef8"
+                "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-9e79cb.tar",
+                "reference": "48b6b104cedc5d6720adfc04956d3f2ceb787230",
+                "shasum": "2b319b5661cf95f514e7a335a1756994e6bfe28e"
             },
             "require": {
                 "barryvdh/laravel-debugbar": "^3.6",
                 }
             ],
             "description": "Fluidbook Tools",
-            "time": "2022-08-29T13:17:31+00:00"
+            "time": "2022-08-31T09:49:48+00:00"
         },
         {
             "name": "genealabs/laravel-model-caching",
         },
         {
             "name": "laravel/serializable-closure",
-            "version": "v1.2.0",
+            "version": "v1.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/serializable-closure.git",
-                "reference": "09f0e9fb61829f628205b7c94906c28740ff9540"
+                "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540",
-                "reference": "09f0e9fb61829f628205b7c94906c28740ff9540",
+                "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d78fd36ba031a1a695ea5a406f29996948d7011b",
+                "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b",
                 "shasum": ""
             },
             "require": {
                 "php": "^7.3|^8.0"
             },
             "require-dev": {
-                "pestphp/pest": "^1.18",
-                "phpstan/phpstan": "^0.12.98",
-                "symfony/var-dumper": "^5.3"
+                "nesbot/carbon": "^2.61",
+                "pestphp/pest": "^1.21.3",
+                "phpstan/phpstan": "^1.8.2",
+                "symfony/var-dumper": "^5.4.11"
             },
             "type": "library",
             "extra": {
                 "issues": "https://github.com/laravel/serializable-closure/issues",
                 "source": "https://github.com/laravel/serializable-closure"
             },
-            "time": "2022-05-16T17:09:47+00:00"
+            "time": "2022-08-26T15:25:27+00:00"
         },
         {
             "name": "lavary/laravel-menu",