['svg', '200', true, true, 'html'],
];
-
foreach ($files as $file) {
$book->getFile($page, $file[0], $file[1], $file[2], $file[3], $file[4], true);
}
}
}
+
+ public function checkInfos()
+ {
+ if (null === $this->generalInfos) {
+ $this->getInfos(null, true);
+ }
+ }
+
public function getCroppedPDF()
{
if (!file_exists($this->cropped)) {
if ($do || $force) {
$this->makeFile($file, $page, $format, $resolution, $withText, $withGraphics, $version);
}
+
return $file;
}
public function getResolutionRatio()
{
+ $this->checkInfos();
$a4surface = 500990; // en pt²
$docSurface = $this->generalInfos['size'][0] * $this->generalInfos['size'][1]; // en pt²
// to have the same surface resulting in px, we have to sqrt the ratio between the two surfaces defined above
public function getMobileFirstRatio()
{
+ $this->checkInfos();
return 620 / $this->generalInfos['size'][0];
}
$pnmtopng->execute();\r
}\r
unlink($tmp);\r
+ }else{\r
+ $pdftoppm->debug();\r
+ echo $pdftoppm->command.':'.$pdftoppm->output;\r
+ exit;\r
}\r
}\r
\r
$daoDoc = new wsDAODocument($core->con);
$firstDoc = $daoDoc->selectById($this->pages[1]['document_id']);
+ $firstDoc->checkInfos();
$size = $firstDoc->generalInfos['size'];
$this->log('Got data from database');
$cssHeight = $this->cssHeight;
$cssScale = $this->cssScale;
$w2 = ($cssWidth * 2) . 'px';
-
-
$h = $cssHeight . 'px';
$wm = ($this->width * $this->multiply) . 'px';
$this->lessVariables['z'] = $this->z;
$this->lessVariables['book-page-width'] = $w;
+
if ($this->book->parametres->correctCenter && !$this->isMobileFirst()) {
$this->lessVariables['book-page-correct-width'] = ceil($w) + 1;
$this->lessVariables['book-page-correct-height'] = ceil($h) + 1;