protected $fontsNames = array();\r
protected $fontsCount = 0;\r
\r
+ protected $coef;\r
+\r
protected $div = array();\r
\r
public function __construct($book_id)\r
{\r
parent::__construct($book_id);\r
$this->version = 'html5';\r
+\r
+ $this->coef = 150 / 72;\r
}\r
\r
protected function preparePackage()\r
\r
protected function writeDiv($div)\r
{\r
- $res = '<div style="left:' . ($div['left'] * 2) . 'px;top:' . ($div['top'] * 2) . 'px;">';\r
+ $res = '<div style="left:' . ($div['left'] * $this->coef) . 'px;top:' . ($div['top'] * $this->coef) . 'px;">';\r
foreach($div['span'] as $span) {\r
$res .= $this->writeSpan($span);\r
}\r
protected function writeSpan($span)\r
{\r
$res = '<span ';\r
- $res .= 'style="left:' . ($span['left'] * 2) . 'px;top:' . ($span['top'] * 2) . 'px" ';\r
+ $res .= 'style="left:' . ($span['left'] * $this->coef) . 'px;top:' . ($span['top'] * $this->coef) . 'px" ';\r
$res .= 'class="c' . $span['color'] . ' s' . $span['size'] . ' f' . $span['font'] . '"';\r
$res .= '>';\r
$res .= htmlentities($span['text'], ENT_NOQUOTES, 'UTF-8');\r
}\r
\r
foreach($this->cssSize as $size => $index) {\r
- $size /= 100;\r
+ $size = ($size/(20*16))*$this->coef;\r
$res[] = '.s' . $index . '{font-size:' . $size . 'em;}';\r
}\r
\r