$pdftocairo->setPath(CONVERTER_PATH);
$pdftocairo->setArg('f', $page);
$pdftocairo->setArg('l', $page);
+ $pdftocairo->setArg('r', 300);
+ $pdftocairo->setArg(null, '-expand');
$pdftocairo->setArg(null, '-svg');
$pdftocairo->setArg(null, $this->cropped);
$pdftocairo->setArg(null, $svgFile);
$this->cssOneWidth = $this->width * $this->cssOneScale;
$this->cssOneHeight = $this->height * $this->cssOneScale;
- $this->cssSVGScale = 0.75 / 2;
+ $this->cssSVGScale = 1;
$this->scale = 1;
if ($this->book->parametres->zoomMode == 1) {
$lessVariables['page-transition-duration'] = $this->book->parametres->mobileTransitionDuration . 's';
- $res[] = '.background{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';}';
- foreach ($this->getResolutions() as $r) {
- $ratio = round(72 / $r, 3) * $cssScale;
+ $res[] = '.background{width:100%;height:100%}';
- $wr = $cssWidth / $ratio;
- $hr = $cssHeight / $ratio;
-
- $br = '.background.r' . $r . '{';
- if ($ratio != 1) {
- $br .= wsHTML5::writeCSSUA('transform', 'scale(' . $ratio . ')') . ';';
- }
- $br .= 'width:' . $wr . 'px;height:' . $hr . 'px;}';
- $res[] = $br;
- }
- $texts = '.texts{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';';
- $texts .= wsHTML5::writeCSSUA('transform', 'scale(' . round((1 / $this->multiply) * $cssScale * $this->cssSVGScale, 3) . ')') . ';';
- $texts .= 'width:' . ($wm / $this->cssSVGScale) . 'px; max-width:' . ($wm / $this->cssSVGScale) . 'px;';
- $texts .= 'height:' . ($hm / $this->cssSVGScale) . 'px; max-height:' . ($hm / $this->cssSVGScale) . 'px;';
- $texts .= '}';
+ if ($this->cssSVGScale != 1) {
+ $texts = '.texts{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';';
+ $texts .= wsHTML5::writeCSSUA('transform', 'scale(' . round((1 / $this->multiply) * $cssScale * $this->cssSVGScale, 3) . ')') . ';';
+ $texts .= 'width:' . ($wm / $this->cssSVGScale) . 'px; max-width:' . ($wm / $this->cssSVGScale) . 'px;';
+ $texts .= 'height:' . ($hm / $this->cssSVGScale) . 'px; max-height:' . ($hm / $this->cssSVGScale) . 'px;';
+ $texts .= '}';
+ } else {
+ $texts = '.texts{width:' . floor(($wm / $this->cssSVGScale) + 4) . 'px;height:' . floor(($hm / $this->cssSVGScale) + 4) . 'px;}';
+ }
$res[] = $texts;
// Theme