namespace App\Jobs;
use Cubist\Util\CommandLine;
+use Cubist\Util\Files\Files;
+use Cubist\Util\PHP;
use Fluidbook\Tools\FluidbookTools;
+use Fluidbook\Tools\Jobs\ProcessFile;
use Fluidbook\Tools\PDF\Document;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
public function handle()
{
$sync = ($this->job instanceof SyncJob);
+ if ($sync) {
+ PHP::neverStop(false);
+ }
start_measure('Process Fluidbook');
$this->resetOutput();
public function processPages($sync = false)
{
start_measure('Process Pages');
- $out = storage_path('fluidbook/convert/' . $this->in->getHash());
- $this->in->processPages($out, [
- ['format' => 'jpg', 'resolution' => '36', 'withTexts' => true, 'withGraphics' => true],
- ['format' => 'jpg', 'resolution' => '150', 'withTexts' => false, 'withGraphics' => true],
- // ['format' => 'jpg', 'resolution' => '300', 'withTexts' => false, 'withGraphics' => true],
- ['format' => 'svg', 'resolution' => '300', 'withTexts' => true, 'withGraphics' => false],
+ $out = storage_path('fluidbook/convert/' . $this->in->getHash() . '/');
+ Files::mkdir($out);
+ $this->in->processPages($out, [new ProcessFile('jpg', 'thumb'),
+ new ProcessFile('jpg', 150, false, true),
+ new ProcessFile('svg', 300, true, false),
], $sync);
stop_measure('Process Pages');
"source": {
"type": "git",
"url": "git://git.cubedesigners.com/fluidbook_tools.git",
- "reference": "fbcd179c04e2bd1061307bcabda70a9756b4217b"
+ "reference": "21176c4e485d13bdb24c43cf3c038539df01e01d"
},
"dist": {
"type": "tar",
- "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-d6dc02.tar",
- "reference": "fbcd179c04e2bd1061307bcabda70a9756b4217b",
- "shasum": "88e7797805be96ed7a2ba0842029d42f1466d5b4"
+ "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-0bc471.tar",
+ "reference": "21176c4e485d13bdb24c43cf3c038539df01e01d",
+ "shasum": "15f3ddd393e9e20dfc589c933b27e8a0e830f788"
},
"require": {
+ "barryvdh/laravel-debugbar": "^3.6",
"cubist/util": "dev-master",
"ext-dom": "*",
"ext-gd": "*",
}
],
"description": "Fluidbook Tools",
- "time": "2021-09-06T17:21:56+00:00"
+ "time": "2021-09-08T14:14:45+00:00"
},
{
"name": "fruitcake/laravel-cors",
},
{
"name": "laravel/framework",
- "version": "v8.58.0",
+ "version": "v8.60.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "1b819bf99d87bd543a4d4895e5b3350f61ea7a23"
+ "reference": "44f16a31a1d4ac8a51605550d7796e2273984a48"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/1b819bf99d87bd543a4d4895e5b3350f61ea7a23",
- "reference": "1b819bf99d87bd543a4d4895e5b3350f61ea7a23",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/44f16a31a1d4ac8a51605550d7796e2273984a48",
+ "reference": "44f16a31a1d4ac8a51605550d7796e2273984a48",
"shasum": ""
},
"require": {
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-08-31T13:55:57+00:00"
+ "time": "2021-09-08T13:37:21+00:00"
},
{
"name": "laravel/sanctum",