From: vincent@cubedesigners.com Date: Fri, 29 Apr 2011 10:15:15 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=22cf6b81052c2de613821c753138ff28ba4fdfec;p=cubeextranet.git --- diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 5307b4b50..777e21259 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -41,12 +41,16 @@ class wsDocument extends cubeMetier { const NORMAL = 0; const FLATTEN = 1; + const TEXTS_AS_SHAPES = 1.5; const POLY2BITMAP = 2; const BITMAP = 3; const BARBARE_PNM = 4; const BARBARE_GS = 5; + const MAX = 5; + public static $methods = array(NORMAL, FLATTEN, TEXTS_AS_SHAPES, POLYTOBITMAP, BITMAP, BARBARE_PNM, BARBARE_GS); + const PNM_FILL = 2; protected static $resolution2multiply = array(72 => 2, 100 => 2, 150 => 3, 200 => 3, 300 => 3, 450 => 4, 600 => 5); @@ -619,7 +623,9 @@ class wsDocument extends cubeMetier { if ($method == self::MAX) { return; } - return $this->makeSWFFiles($page, $resolution, $quality, $storeAllChars, $maxObjects, $method + 1); + $index = array_search($method, self::$methods) + 1; + $nextMethod = self::$methods[$index]; + return $this->makeSWFFiles($page, $resolution, $quality, $storeAllChars, $maxObjects, $nextMethod); } } } @@ -770,6 +776,9 @@ disablelinks Disable links. } elseif ($method == self::FLATTEN) { $pdf2swf->setArg('flatten'); $multiply = 1; + } elseif ($method == self::TEXTS_AS_SHAPES) { + $pdf2swf->setArg('--shapes'); + $multiply = 1; } elseif ($method == self::POLY2BITMAP) { // Raster graphics, keep texts $pdf2swf->setArg('set poly2bitmap');