]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sat, 17 Mar 2012 15:22:06 +0000 (15:22 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sat, 17 Mar 2012 15:22:06 +0000 (15:22 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php

index 2dfb6c4fcfc2b674a1f17903de189f2cf30ec10e..ddb1fa39be84882cbe0d6f568596141525fb14d9 100644 (file)
@@ -97,8 +97,8 @@ class wsHTML5Compiler {
                $this->height = round($size[1], 2);
 
 
-               $imagesize = getimagesize(WS_DOCS . '/' . $this->pages[1]['document_id'] . '/html/h72-' . $this->pages[1]['document_page'] . '.jpg');
-               $this->pdf2htmlRatio = round($imagesize[0] / $this->width, 2);
+               $imagesize = getimagesize(WS_DOCS . '/' . $this->pages[1]['document_id'] . '/html/h150-' . $this->pages[1]['document_page'] . '.jpg');
+               $this->pdf2htmlRatio = round(($imagesize[0]*0.48) / $this->width, 2);
 
                $this->cssScale = min($this->optimalWidth / $this->width, $this->optimalHeight / $this->height);
                $this->cssOneScale = min(($this->optimalWidth * 2) / $this->width, $this->optimalHeight / $this->height);
@@ -561,6 +561,17 @@ class wsHTML5Compiler {
                return implode(';', $res);
        }
 
+       protected function base62($val) {
+               $chars = '0123456789abcdefghijklmnopqrstuvwxyz';
+               $base = strlen($chars);
+               $str = '';
+               do {
+                       $i = $val % $base;
+                       $str = $chars[$i] . $str;
+                       $val = ($val - $i) / $base;
+               } while ($val > 0);
+               return $str;
+       }
        public function copyLinkFile($source, $dest, $video = false) {
                $origDir = WS_BOOKS . '/working/' . $this->book_id . '/';
                $types = array('flv', 'mp4', 'ogv', 'webm', 'jpg');