// Then make HD background shots\r
$resolutions = array(36 => 80, 72 => 70, 150 => 50);\r
foreach ($resolutions as $r => $q) {\r
- $this->makeShotPNM($page, 'html/h' . $r . '-', $r, $q, 4, null, false);\r
+ $texts=true;\r
+ $this->makeShotPNM($page, 'html/h' . $r . '-', $r, $q, 4, null, $texts);\r
}\r
}\r
\r
mkdir($this->vdir . '/images/' . $r, 0777);\r
}\r
foreach ($this->pages as $page => $infos) {\r
- foreach ($resolutions as $r) {\r
+ foreach ($self::$resolutions as $r) {\r
copy(WS_DOCS . '/' . $infos['document_id'] . '/html/h' . $r . '-' . $infos['document_page'] . '.jpg', $this->vdir . '/images/' . $r . '/p' . $page . '.jpg');\r
}\r
}\r
}\r
\r
$group['y'] = $this->getCSSY($group['y'] * $this->multiply);\r
+ $group['x'] = $this->getCSSX($group['x'] * $this->multiply);\r
\r
$class = array('g');\r
if (!is_null($group['color'])) {\r
if (!is_null($group['font'])) {\r
$class[] = 'f' . $group['font'];\r
}\r
+ if (!is_null($group['x'])) {\r
+ $class[] = 'x' . $group['x'];\r
+ }\r
if (!is_null($group['y'])) {\r
$class[] = 'y' . $group['y'];\r
}\r
\r
$navTop = ($this->book->parametres->height - 40 - 100) / 2;\r
$res[] = '#next,#previous{top:' . $navTop . 'px}';\r
- $res[] = '.page,.background{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}';\r
+ $res[] = '.page,.texts{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}';\r
$res[] = '.doublePage,#pages{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}';\r
$res[] = '.page.right{left:' . $w . '}';\r
\r
foreach (self::$resolutions as $r) {\r
- $wb = ($this->book->parametres->width * $r) / 72;\r
- $hb = ($this->book->parametres->height * $r) / 72;\r
+ $wb = round(($this->book->parametres->width * $r) / 72, 2) . 'px';\r
+ $hb = round(($this->book->parametres->height * $r) / 72, 2) . 'px';\r
$s = 72 / $r;\r
\r
$scale = '';\r
$scale = self::writeCSSUA('transform', 'scale(' . $s . ')');\r
}\r
\r
- $res[] = '.background .r' . $r . '{width:' . $wb . ';height:' . $hb . ';' . $scale . '}';\r
+ $res[] = '.background.r' . $r . '{width:' . $wb . ';height:' . $hb . ';' . $scale . '}';\r
}\r
\r
foreach ($this->cssColor as $color => $index) {\r
\r
$res = array();\r
\r
+ $first = true;\r
foreach ($group->s as $span) {\r
+ if ($first) {\r
+ $x = $span['x'];\r
+ $first = false;\r
+ }\r
$newSpan = $this->addSpan($span, $document_id);\r
\r
array_push($res, $newSpan);\r
'letterspacing' => $this->getCSSLetterSpacing($group['letterspacing']),\r
'wordspacing' => $this->getCSSWordSpacing($group['wordspacing']),\r
'y' => ($group['size']) / -1.2,\r
+ 'x' => $x,\r
'spans' => $res);\r
}\r
\r
}\r
\r
protected function base62($val) {\r
- $base = 62;\r
- $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r
+ $chars = '0123456789abcdefghijklmnopqrstuvwxyz';\r
+ $base = strlen($chars);\r
$str = '';\r
do {\r
$i = $val % $base;\r