diff --git a/js/get_scripts.js.php b/js/get_scripts.js.php index 4ba2f0d7cc..b23ccefd11 100644 --- a/js/get_scripts.js.php +++ b/js/get_scripts.js.php @@ -1,7 +1,7 @@ addFile('makegrid.js'); $scripts->addFile('sql.js'); + $table_maintenance_html = ''; if (isset($message)) { $message = PMA_Message::success($message); $table_maintenance_html = PMA_Util::getMessage( @@ -2077,8 +2078,8 @@ function PMA_sendQueryResponseForResultsReturned($result, $justBrowsing, $table_maintenance_html .= PMA_getHtmlForSqlQueryResultsTable( isset($sql_data) ? $sql_data : null, $displayResultsObject, $db, $goto, $pmaThemeImage, $url_query, $disp_mode, $sql_limit_to_append, - false, $unlim_num_rows, $num_rows, $showtable, $result, $querytime, - $analyzed_sql_results, false + false, $unlim_num_rows, $num_rows, $showtable, $result, + $analyzed_sql_results ); if (empty($sql_data) || ($sql_data['valid_queries'] = 1)) { $response->addHTML($table_maintenance_html); diff --git a/libraries/tcpdf/README.TXT b/libraries/tcpdf/README.TXT index 2c79a62c9a..18d6974591 100644 --- a/libraries/tcpdf/README.TXT +++ b/libraries/tcpdf/README.TXT @@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076 ------------------------------------------------------------ Name: TCPDF -Version: 6.0.036 -Release date: 2013-09-29 +Version: 6.0.037 +Release date: 2013-09-30 Author: Nicola Asuni Copyright (c) 2002-2013: diff --git a/libraries/tcpdf/include/tcpdf_colors.php b/libraries/tcpdf/include/tcpdf_colors.php index 2369be6f0e..64752852fb 100644 --- a/libraries/tcpdf/include/tcpdf_colors.php +++ b/libraries/tcpdf/include/tcpdf_colors.php @@ -1,9 +1,9 @@ array( 0, 100, 100, 0, 'Red'), 'green' => array(100, 0, 100, 0, 'Green'), 'blue' => array(100, 100, 0, 0, 'Blue'), - // the following are just examples, fill the array with your own values - 'mytcpdfblack' => array(0, 0, 0, 100, 'My TCPDF Black'), - 'mytcpdfred' => array(30, 100, 90, 10, 'My TCPDF Red'), - 'mytcpdfgreen' => array(100, 30, 100, 0, 'My TCPDF Green'), - 'mytcpdfblue' => array(100, 60, 10, 5, 'My TCPDF Blue'), - 'mytcpdfyellow' => array(0, 20, 100, 0, 'My TCPDF Yellow'), + // Add here standard spot colors or dynamically define them with AddSpotColor() // ... ); // end of spot colors diff --git a/libraries/tcpdf/include/tcpdf_static.php b/libraries/tcpdf/include/tcpdf_static.php index 937deb0d18..ee4bcb7bea 100644 --- a/libraries/tcpdf/include/tcpdf_static.php +++ b/libraries/tcpdf/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.0.036'; + private static $tcpdf_version = '6.0.037'; /** * String alias for total number of pages. diff --git a/libraries/tcpdf/tcpdf.php b/libraries/tcpdf/tcpdf.php index 4d2e71235c..aefdd556ec 100644 --- a/libraries/tcpdf/tcpdf.php +++ b/libraries/tcpdf/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.0.036 + * @version 6.0.037 */ // TCPDF configuration @@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php'); * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.0.036 + * @version 6.0.037 * @author Nicola Asuni - info@tecnick.com */ class TCPDF { @@ -3652,6 +3652,16 @@ class TCPDF { return $this->page; } + /** + * Returns the array of spot colors. + * @return (array) Spot colors array. + * @public + * @since 6.0.037 (2013-09-30) + */ + public function getAllSpotColors() { + return $this->spot_colors; + } + /** * Defines a new spot color. * It can be expressed in RGB components or gray scale. @@ -7838,6 +7848,7 @@ class TCPDF { $groupnum = 0; $ptgu = 1; $ptga = 1; + $ptg_num_chars = 1; for ($n = 1; $n <= $num_pages; ++$n) { // get current page $temppage = $this->getPageBuffer($n); @@ -13919,12 +13930,25 @@ class TCPDF { * @param $h (float) height of the rectangle. * @param $transition (boolean) if true prints tcolor transitions to white. * @param $vertical (boolean) if true prints bar vertically. - * @param $colors (string) colors to print, one letter per color separated by comma (for example 'A,W,R,G,B,C,M,Y,K,RGB,CMYK,ALL'): A = grayscale black, W = grayscale white, R = RGB red, G RGB green, B RGB blue, C = CMYK cyan, M = CMYK magenta, Y = CMYK yellow, K = CMYK key/black, RGB = RGB registration color, CMYK = CMYK registration color, ALL = Spot registration color. + * @param $colors (string) colors to print separated by comma. Valid values are: A,W,R,G,B,C,M,Y,K,RGB,CMYK,ALL,ALLSPOT,. Where: A = grayscale black, W = grayscale white, R = RGB red, G RGB green, B RGB blue, C = CMYK cyan, M = CMYK magenta, Y = CMYK yellow, K = CMYK key/black, RGB = RGB registration color, CMYK = CMYK registration color, ALL = Spot registration color, ALLSPOT = print all defined spot colors, = name of the spot color to print. * @author Nicola Asuni * @since 4.9.000 (2010-03-26) * @public */ public function colorRegistrationBar($x, $y, $w, $h, $transition=true, $vertical=false, $colors='A,R,G,B,C,M,Y,K') { + if (strpos($colors, 'ALLSPOT') !== false) { + // expand spot colors + $spot_colors = ''; + foreach ($this->spot_colors as $spot_color_name => $v) { + $spot_colors .= ','.$spot_color_name; + } + if (!empty($spot_colors)) { + $spot_colors = substr($spot_colors, 1); + $colors = str_replace('ALLSPOT', $spot_colors, $colors); + } else { + $colors = str_replace('ALLSPOT', 'NONE', $colors); + } + } $bars = explode(',', $colors); $numbars = count($bars); // number of bars to print if ($numbars <= 0) { @@ -14004,23 +14028,38 @@ class TCPDF { $col_b = array(100,100,100,100); break; } - case 'ALL': - default: { // SPOT COLOR REGISTRATION + case 'ALL': { // SPOT COLOR REGISTRATION $col_a = array(0,0,0,0,'None'); $col_b = array(100,100,100,100,'All'); break; } + case 'NONE': { // SKIP THIS COLOR + $col_a = array(0,0,0,0,'None'); + $col_b = array(0,0,0,0,'None'); + break; + } + default: { // SPECIFIC SPOT COLOR NAME + $col_a = array(0,0,0,0,'None'); + $col_b = TCPDF_COLORS::getSpotColor($col, $this->spot_colors); + if ($col_b === false) { + // in case of error defaults to the registration color + $col_b = array(100,100,100,100,'All'); + } + break; + } } - if ($transition) { - // color gradient - $this->LinearGradient($xb, $yb, $wb, $hb, $col_a, $col_b, $coords); - } else { - $this->SetFillColorArray($col_b); - // colored rectangle - $this->Rect($xb, $yb, $wb, $hb, 'F', array()); + if ($col != 'NONE') { + if ($transition) { + // color gradient + $this->LinearGradient($xb, $yb, $wb, $hb, $col_a, $col_b, $coords); + } else { + $this->SetFillColorArray($col_b); + // colored rectangle + $this->Rect($xb, $yb, $wb, $hb, 'F', array()); + } + $xb += $xd; + $yb += $yd; } - $xb += $xd; - $yb += $yd; } } @@ -14108,23 +14147,63 @@ class TCPDF { * @public */ public function registrationMark($x, $y, $r, $double=false, $cola=array(100,100,100,100,'All'), $colb=array(0,0,0,0,'None')) { - $line_style = array('width' => (0.5 / $this->k), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $cola); + $line_style = array('width' => max((0.5 / $this->k),($r / 30)), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => $cola); $this->SetFillColorArray($cola); $this->PieSector($x, $y, $r, 90, 180, 'F'); $this->PieSector($x, $y, $r, 270, 360, 'F'); $this->Circle($x, $y, $r, 0, 360, 'C', $line_style, array(), 8); if ($double) { - $r2 = $r * 0.5; + $ri = $r * 0.5; $this->SetFillColorArray($colb); - $this->PieSector($x, $y, $r2, 90, 180, 'F'); - $this->PieSector($x, $y, $r2, 270, 360, 'F'); + $this->PieSector($x, $y, $ri, 90, 180, 'F'); + $this->PieSector($x, $y, $ri, 270, 360, 'F'); $this->SetFillColorArray($cola); - $this->PieSector($x, $y, $r2, 0, 90, 'F'); - $this->PieSector($x, $y, $r2, 180, 270, 'F'); - $this->Circle($x, $y, $r2, 0, 360, 'C', $line_style, array(), 8); + $this->PieSector($x, $y, $ri, 0, 90, 'F'); + $this->PieSector($x, $y, $ri, 180, 270, 'F'); + $this->Circle($x, $y, $ri, 0, 360, 'C', $line_style, array(), 8); } } + /** + * Paints a CMYK registration mark + * @param $x (float) abscissa of the registration mark center. + * @param $y (float) ordinate of the registration mark center. + * @param $r (float) radius of the crop mark. + * @author Nicola Asuni + * @since 6.0.037 (2013-09-30) + * @public + */ + public function registrationMarkCMYK($x, $y, $r) { + // line width + $lw = max((0.5 / $this->k),($r / 8)); + // internal radius + $ri = ($r * 0.6); + // external radius + $re = ($r * 1.3); + // Cyan + $this->SetFillColorArray(array(100,0,0,0)); + $this->PieSector($x, $y, $ri, 270, 360, 'F'); + // Magenta + $this->SetFillColorArray(array(0,100,0,0)); + $this->PieSector($x, $y, $ri, 0, 90, 'F'); + // Yellow + $this->SetFillColorArray(array(0,0,100,0)); + $this->PieSector($x, $y, $ri, 90, 180, 'F'); + // Key - black + $this->SetFillColorArray(array(0,0,0,100)); + $this->PieSector($x, $y, $ri, 180, 270, 'F'); + // registration color + $line_style = array('width' => $lw, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(100,100,100,100,'All')); + $this->SetFillColorArray(array(100,100,100,100,'All')); + // external circle + $this->Circle($x, $y, $r, 0, 360, 'C', $line_style, array(), 8); + // cross lines + $this->Line($x, ($y - $re), $x, ($y - $ri)); + $this->Line($x, ($y + $ri), $x, ($y + $re)); + $this->Line(($x - $re), $y, ($x - $ri), $y); + $this->Line(($x + $ri), $y, ($x + $re), $y); + } + /** * Paints a linear colour gradient. * @param $x (float) abscissa of the top left corner of the rectangle. @@ -14328,7 +14407,7 @@ class TCPDF { } break; } - case 1: { // Gray scale + case 1: { // GRAY SCALE $this->gradients[$n]['colspace'] = 'DeviceGray'; if (!empty($background)) { $this->gradients[$n]['background'] = sprintf('%F', $bcolor[0]/255); @@ -14370,6 +14449,7 @@ class TCPDF { // set colors $color = array_values($stop['color']); switch($numcolspace) { + case 5: // SPOT case 4: { // CMYK $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F %F %F %F', $color[0]/100, $color[1]/100, $color[2]/100, $color[3]/100); break; @@ -14378,7 +14458,7 @@ class TCPDF { $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F %F %F', $color[0]/255, $color[1]/255, $color[2]/255); break; } - case 1: { // Gray scale + case 1: { // GRAY SCALE $this->gradients[$n]['colors'][$key]['color'] = sprintf('%F', $color[0]/255); break; }