Fix: tcpdf bug
This commit is contained in:
parent
2c71c898eb
commit
e13974b5f3
@ -76,7 +76,7 @@
|
||||
// dullus for text Justification.
|
||||
// Bob Vincent (pillarsdotnet@users.sourceforge.net) for <li> value attribute.
|
||||
// Patrick Benny for text stretch suggestion on Cell().
|
||||
// Johannes Güntert for JavaScript support.
|
||||
// Johannes G<EFBFBD>ntert for JavaScript support.
|
||||
// Denis Van Nuffelen for Dynamic Form.
|
||||
// Jacek Czekaj for multibyte justification
|
||||
// Anthony Ferrara for the reintroduction of legacy image methods.
|
||||
@ -87,7 +87,7 @@
|
||||
// Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support.
|
||||
// Moritz Wagner and Andreas Wurmser for graphic functions.
|
||||
// Andrew Whitehead for core fonts support.
|
||||
// Esteban Joël Marín for OpenType font conversion.
|
||||
// Esteban Jo<EFBFBD>l Mar<61>n for OpenType font conversion.
|
||||
// Teus Hagen for several suggestions and fixes.
|
||||
// Yukihiro Nakadaira for CID-0 CJK fonts fixes.
|
||||
// Kosmas Papachristos for some CSS improvements.
|
||||
@ -5324,7 +5324,7 @@ class TCPDF {
|
||||
$cbbox = array();
|
||||
}
|
||||
// initialize subsetchars
|
||||
$subsetchars = array();
|
||||
$subsetchars = array_fill(0, 256, true);
|
||||
$this->setFontBuffer($fontkey, array('fontkey' => $fontkey, 'i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'cbbox' => $cbbox, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg, 'subset' => $subset, 'subsetchars' => $subsetchars));
|
||||
if ($this->inxobj) {
|
||||
// we are inside an XObject template
|
||||
@ -7123,7 +7123,7 @@ class TCPDF {
|
||||
* @param $cellpadding (float) Internal cell padding, if empty uses default cell padding.
|
||||
* @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul> or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
|
||||
* @return float Return the minimal height needed for multicell method for printing the $txt param.
|
||||
* @author Alexander Escalona Fernández, Nicola Asuni
|
||||
* @author Alexander Escalona Fern<EFBFBD>ndez, Nicola Asuni
|
||||
* @public
|
||||
* @since 4.5.011
|
||||
*/
|
||||
@ -7230,7 +7230,7 @@ class TCPDF {
|
||||
* @param $cellpadding (float) Internal cell padding, if empty uses default cell padding.
|
||||
* @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul> or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
|
||||
* @return float Return the minimal height needed for multicell method for printing the $txt param.
|
||||
* @author Nicola Asuni, Alexander Escalona Fernández
|
||||
* @author Nicola Asuni, Alexander Escalona Fern<EFBFBD>ndez
|
||||
* @public
|
||||
*/
|
||||
public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) {
|
||||
@ -15417,7 +15417,7 @@ class TCPDF {
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points.
|
||||
* Append a cubic B<EFBFBD>zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the B<EFBFBD>zier control points.
|
||||
* The new current point shall be (x3, y3).
|
||||
* @param $x1 (float) Abscissa of control point 1.
|
||||
* @param $y1 (float) Ordinate of control point 1.
|
||||
@ -15435,7 +15435,7 @@ class TCPDF {
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points.
|
||||
* Append a cubic B<EFBFBD>zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the B<EFBFBD>zier control points.
|
||||
* The new current point shall be (x3, y3).
|
||||
* @param $x2 (float) Abscissa of control point 2.
|
||||
* @param $y2 (float) Ordinate of control point 2.
|
||||
@ -15451,7 +15451,7 @@ class TCPDF {
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bézier control points.
|
||||
* Append a cubic B<EFBFBD>zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the B<EFBFBD>zier control points.
|
||||
* The new current point shall be (x3, y3).
|
||||
* @param $x1 (float) Abscissa of control point 1.
|
||||
* @param $y1 (float) Ordinate of control point 1.
|
||||
@ -16855,7 +16855,7 @@ class TCPDF {
|
||||
/**
|
||||
* Insert Named Destinations.
|
||||
* @protected
|
||||
* @author Johannes Güntert, Nicola Asuni
|
||||
* @author Johannes G<EFBFBD>ntert, Nicola Asuni
|
||||
* @since 5.9.098 (2011-06-23)
|
||||
*/
|
||||
protected function _putdests() {
|
||||
@ -17054,7 +17054,7 @@ class TCPDF {
|
||||
* Adds a javascript
|
||||
* @param $script (string) Javascript code
|
||||
* @public
|
||||
* @author Johannes Güntert, Nicola Asuni
|
||||
* @author Johannes G<EFBFBD>ntert, Nicola Asuni
|
||||
* @since 2.1.002 (2008-02-12)
|
||||
*/
|
||||
public function IncludeJS($script) {
|
||||
@ -17083,7 +17083,7 @@ class TCPDF {
|
||||
/**
|
||||
* Create a javascript PDF string.
|
||||
* @protected
|
||||
* @author Johannes Güntert, Nicola Asuni
|
||||
* @author Johannes G<EFBFBD>ntert, Nicola Asuni
|
||||
* @since 2.1.002 (2008-02-12)
|
||||
*/
|
||||
protected function _putjavascript() {
|
||||
@ -19146,7 +19146,7 @@ class TCPDF {
|
||||
* @param $col1 (array) first color (Grayscale, RGB or CMYK components).
|
||||
* @param $col2 (array) second color (Grayscale, RGB or CMYK components).
|
||||
* @param $coords (array) array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0).
|
||||
* @author Andreas Würmser, Nicola Asuni
|
||||
* @author Andreas W<EFBFBD>rmser, Nicola Asuni
|
||||
* @since 3.1.000 (2008-06-09)
|
||||
* @public
|
||||
*/
|
||||
@ -19164,7 +19164,7 @@ class TCPDF {
|
||||
* @param $col1 (array) first color (Grayscale, RGB or CMYK components).
|
||||
* @param $col2 (array) second color (Grayscale, RGB or CMYK components).
|
||||
* @param $coords (array) array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined.
|
||||
* @author Andreas Würmser, Nicola Asuni
|
||||
* @author Andreas W<EFBFBD>rmser, Nicola Asuni
|
||||
* @since 3.1.000 (2008-06-09)
|
||||
* @public
|
||||
*/
|
||||
@ -19187,7 +19187,7 @@ class TCPDF {
|
||||
* @param $coords_min (array) minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0
|
||||
* @param $coords_max (array) maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1
|
||||
* @param $antialias (boolean) A flag indicating whether to filter the shading function to prevent aliasing artifacts.
|
||||
* @author Andreas Würmser, Nicola Asuni
|
||||
* @author Andreas W<EFBFBD>rmser, Nicola Asuni
|
||||
* @since 3.1.000 (2008-06-09)
|
||||
* @public
|
||||
*/
|
||||
@ -19279,7 +19279,7 @@ class TCPDF {
|
||||
* @param $y (float) ordinate of the top left corner of the rectangle.
|
||||
* @param $w (float) width of the rectangle.
|
||||
* @param $h (float) height of the rectangle.
|
||||
* @author Andreas Würmser, Nicola Asuni
|
||||
* @author Andreas W<EFBFBD>rmser, Nicola Asuni
|
||||
* @since 3.1.000 (2008-06-09)
|
||||
* @protected
|
||||
*/
|
||||
@ -20797,19 +20797,19 @@ class TCPDF {
|
||||
// remove empty blocks
|
||||
$cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata);
|
||||
// replace media type parenthesis
|
||||
$cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1§', $cssdata);
|
||||
$cssdata = preg_replace('/\}\}/si', '}§', $cssdata);
|
||||
$cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1<EFBFBD>', $cssdata);
|
||||
$cssdata = preg_replace('/\}\}/si', '}<EFBFBD>', $cssdata);
|
||||
// trim string
|
||||
$cssdata = trim($cssdata);
|
||||
// find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv)
|
||||
$cssblocks = array();
|
||||
$matches = array();
|
||||
if (preg_match_all('/@media[\s]+([^\§]*)§([^§]*)§/i', $cssdata, $matches) > 0) {
|
||||
if (preg_match_all('/@media[\s]+([^\<EFBFBD>]*)<29>([^<5E>]*)<29>/i', $cssdata, $matches) > 0) {
|
||||
foreach ($matches[1] as $key => $type) {
|
||||
$cssblocks[$type] = $matches[2][$key];
|
||||
}
|
||||
// remove media blocks
|
||||
$cssdata = preg_replace('/@media[\s]+([^\§]*)§([^§]*)§/i', '', $cssdata);
|
||||
$cssdata = preg_replace('/@media[\s]+([^\<EFBFBD>]*)<29>([^<5E>]*)<29>/i', '', $cssdata);
|
||||
}
|
||||
// keep 'all' and 'print' media, other media types are discarded
|
||||
if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) {
|
||||
@ -29032,7 +29032,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'Q': { // quadratic Bézier curveto
|
||||
case 'Q': { // quadratic B<EFBFBD>zier curveto
|
||||
foreach ($params as $ck => $cp) {
|
||||
$params[$ck] = $cp;
|
||||
if ((($ck + 1) % 4) == 0) {
|
||||
@ -29058,7 +29058,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'T': { // shorthand/smooth quadratic Bézier curveto
|
||||
case 'T': { // shorthand/smooth quadratic B<EFBFBD>zier curveto
|
||||
foreach ($params as $ck => $cp) {
|
||||
$params[$ck] = $cp;
|
||||
if (($ck % 2) != 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user