}
-
return $res;
}
$this->addToLog($fwstk); */
}
- public function getResolutionRatio(){
+ public function getResolutionRatio() {
$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 makeHTML5Files($page) {
// Then make HD background shots
$resolutions = array(300 => 85, 150 => 85);
- $rratio=$this->getResolutionRatio();
+ $rratio = $this->getResolutionRatio();
foreach ($resolutions as $r => $q) {
$this->makeShotPNM($page, 'html/h' . $r . '-', $r * $rratio, $q, 4, null, false);
$this->makeShotPNM($page, 'html/t' . $r . '-', $r * $rratio, $q, 4, null, true);
} elseif ($method == self::POLY2BITMAP) {
// Raster graphics, keep texts
$pdf2swf->setArg('set poly2bitmap');
- $multiply = self::$resolution2multiply[$resolution];
- $pdf2swf->setArg('set multiply', $multiply);
+ $pdf2swf->setArg('set multiply', $this->_findMultiply($resolution));
} elseif ($method == self::BITMAP) {
// Raster all
$pdf2swf->setArg('set bitmap');
- $multiply = self::$resolution2multiply[$resolution];
- $pdf2swf->setArg('set multiply', $multiply);
+ $pdf2swf->setArg('set multiply', $this->_findMultiply($resolution));
}
// $pdf2swf->setManualArg('-v');
$pdf2swf->setArg('T', $flashversion);
}
}
+ protected function _findMultiply($resolution) {
+ $resolution /= $this->getResolutionRatio();
+ return self::$resolution2multiply[$resolution];
+ }
+
protected function makeAS3($page) {
$swffile = $this->out . 'p' . $page . '.swf';