$h = $attributes['height'];
$bookwidth = $compiler->getWidthForLinks();
- if ($compiler->isDoublePage() && $x >= $bookwidth) {
- $x -= $bookwidth;
- $attributes['page']++;
- }
-
if (!isset($attributes['pdf']) || !$attributes['pdf']) {
$pdfpath = $compiler->getPagePDFSource($attributes['page']);
$extractPage = 1;
$leftArea,
null, $extractOptions, $cache);
- if (($x + $w) >= $bookwidth && $compiler->isDoublePage()) {
+ if ($attributes['page'] % 2 === 0 && ($x + $w) > ($bookwidth + 1) && $compiler->isDoublePage()) {
if (!isset($attributes['pdf']) || !$attributes['pdf']) {
$pdfpath = $compiler->getPagePDFSource($attributes['page'] + 1);
$extractPage = 1;