]> _ Git - cubeextranet.git/commitdiff
fix #1395 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 May 2017 13:18:58 +0000 (13:18 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 May 2017 13:18:58 +0000 (13:18 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index 67692fa8351d48d4e11da1bae4285302e5d0783f..b54ef1bf6d5c647374d85227e61267183a7902e5 100644 (file)
@@ -1118,10 +1118,10 @@ class zoomLink extends normalLink {
                $p = wsDAOBook::getDocumentPage($this->compiler->book_id, $this->page);
                $pdfpath = wsDocument::getDir($p['document_id']) . 'original.pdf';
 
-               CubeIT_CommandLine_Poppler::extractArea($pdfpath,
+               $leftfile = CubeIT_CommandLine_Poppler::extractArea($pdfpath,
                        $p['document_page'],
                        array('x' => $this->left, 'y' => $this->top, 'width' => $this->width, 'height' => $this->height),
-                       $left, array(), WS_CACHE . '/zoomarea/');
+                       $left, array(), WS_CACHE . '/zoomarea/' . $this->compiler->book_id . '/');
 
                $bookwidth = $this->compiler->book->parametres->width;
 
@@ -1130,18 +1130,18 @@ class zoomLink extends normalLink {
                        $pdfpath = wsDocument::getDir($p['document_id']) . 'original.pdf';
                        $diff = ($this->width + $this->left) - $bookwidth;
                        $right = CubeIT_Files::tempnam();
-                       CubeIT_CommandLine_Poppler::extractArea($pdfpath,
+                       $rightfile = CubeIT_CommandLine_Poppler::extractArea($pdfpath,
                                $p['document_page'],
                                array('x' => 0, 'y' => $this->top, 'width' => $diff, 'height' => $this->height),
-                               $right, array(), WS_CACHE . '/zoomarea/');
+                               $right, array(), WS_CACHE . '/zoomarea/' . $this->compiler->book_id . '/');
 
-                       $both = CubeIT_Files::tempnam() . '.png';
-                       CubeIT_CommandLine_Imagemagick::append(array($left . '.png', $right . '.png'), $both, 'horizontal');
+                       $both = CubeIT_Files::tempnam() . '.jpg';
+                       CubeIT_CommandLine_Imagemagick::append(array($leftfile, $rightfile), $both, 'horizontal');
                } else {
-                       $both = $left . '.png';
+                       $both = $leftfile;
                }
 
-               $this->compiler->simpleCopyLinkFile($both, 'data/links/zoom_' . $this->id . '.png');
+               $this->compiler->simpleCopyLinkFile($both, 'data/links/zoom_' . $this->id . '.jpg');
        }