From: vincent@cubedesigners.com Date: Thu, 6 Jan 2011 18:06:29 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=601c9ff34306460f3cb5e99c48ef3331e706573a;p=cubeextranet.git --- diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index f30a700ce..a0a00b846 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -44,6 +44,8 @@ class wsDocument extends cubeMetier { const BARBARE_PNM = 4; const BARBARE_GS = 5; + const PNM_FILL = 6; + protected static $resolution2multiply = array(72 => 2, 100 => 2, 150 => 3, 200 => 3, 300 => 3, 450 => 4, 600 => 5); // Number section styles protected static @@ -452,7 +454,7 @@ class wsDocument extends cubeMetier { $startpage = is_null($page)?1:$page; for($i = $startpage;true;$i++) { - $ppmfile = $this->out . 'ppm-' . cubeMath::fill($i, 6) . '.ppm'; + $ppmfile = $this->out . 'ppm-' . cubeMath::fill($i, PNM_FILL) . '.ppm'; $jpegfile = $this->out . $prefix . $i . '.jpg'; if (!file_exists($ppmfile)) { break; @@ -713,17 +715,18 @@ disablelinks Disable links. protected function pdf2swfBarbare($page, $resolution = 150, $quality = 85, $method = 4) { // Fabrique les images - if ($method == BARBARE_PNM) { + if ($method == self::BARBARE_PNM) { $this->makeShot($page, 'barbare', $resolution, $quality, 4, 'PNM'); - } elseif ($method == BARBARE_GS) { + } elseif ($method == self::BARBARE_GS) { $this->makeShot($page, 'barbare', $resolution, $quality, 4, 'GS'); } // A partir des images, on crée les swf $jpeg2swf = new cubeCommandLine('jpeg2swf'); $jpeg2swf->setPath(CONVERTER_PATH); - $jpeg2swf->setArg('q', $quality); - $jpeg2swf->setArg('o', $this->out . 'p' . $page . '.swf'); - $jpeg2swf->setArg('f'); + $jpeg2swf->setArg('--quality', $quality); + $jpeg2swf->setArg('--output', $this->out . 'p' . $page . '.swf'); + $jpeg2swf->setArg('--fit-to-movie'); + $jpeg3swf->setArg('--flashversion', 9); $jpeg2swf->setArg(null, $this->out . 'barbare' . $page . '.jpg'); $jpeg2swf->execute(); $this->addToLog($jpeg2swf, true, $page);