$this->imageFormat = $this->fluidbookSettings->imageFormat;
- $imagesize = Image::getimagesize($this->getFluidbook()->getFile(1, $this->imageFormat, 150));
+ $p1 = $this->getFluidbook()->getFile(1, $this->imageFormat, 150);
+ $imagesize = Image::getimagesize($p1);
$this->pdf2htmlRatio = round(($imagesize[0] * 0.48) / $this->width, 12);
$this->linkScale = $this->cssScale = $this->z * min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height);
class FluidbookDocument extends ToolboxModel
{
- public const WS_DOCS = '/data1/extranet/www/fluidbook/docs/';
+ public const WS_DOCS = '/application/protected/fluidbook/docs/';
protected $table = 'fluidbook_document';
protected $_options = ['name' => 'fluidbook-document',
'singular' => 'document',
}
$doc = $this;
- return Cache::tags('fluidbook_document_' . $this->id)->rememberForever($this->fileCacheKey($page, $format, $resolution, $withText, $withGraphics, $version), function () use ($doc, $page, $format, $resolution, $withText, $withGraphics, $version) {
+ $res = Cache::tags('fluidbook_document_' . $this->id)->rememberForever($this->fileCacheKey($page, $format, $resolution, $withText, $withGraphics, $version), function () use ($doc, $page, $format, $resolution, $withText, $withGraphics, $version) {
return $doc->_getFile($page, $format, $resolution, $withText, $withGraphics, $version);
});
+ if (!$res && !$force) {
+ return $this->getFile($page, $format, $resolution, $withText, $withGraphics, $version, true);
+ }
+ return $res;
}
public function removeFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html')
$this->addField('textExtraction', SelectFromArray::class, $this->__('Méthode d\'extraction des textes'), [
'v2' => '{"type":"combo","default":"pdfbox","editable":true,"label":"\\u00a7!\\u00a7M\\u00e9thode d\'extraction des textes!\\u00a7!","datas":{"\\u00a7!\\u00a7PDFBox!\\u00a7!":"pdfbox","\\u00a7!\\u00a7Poppler!\\u00a7!":"poppler","\\u00a7!\\u00a7Fluidbook (exp\\u00e9rimentation bas\\u00e9e sur PDFBox)!\\u00a7!":"fluidbook"}}',
'options' => [
+ 'fluidbook' => $this->__('Fluidbook (basée sur PDFBox)'),
'pdfbox' => $this->__('PDFBox'),
'poppler' => $this->__('Poppler'),
- 'fluidbook' => $this->__('Fluidbook (expérimentation basée sur PDFBox)'),
],
- 'default' => 'pdfbox',
+ 'default' => 'fluidbook',
'fake' => true,
'store_in' => 'settings',
'translatable' => false,
'channels' => [
'stack' => [
'driver' => 'stack',
- 'channels' => ['daily', 'stderr','slack'],
+ 'channels' => ['daily', 'stderr', 'slack'],
'ignore_exceptions' => false,
],
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
- 'level' => 'critical',
+ 'level' => 'debug',
],
'papertrail' => [