@@ -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<EFBFBD> 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.
@@ -2997,7 +2997,7 @@ class TCPDF {
if ( empty ( $orientation )) {
$orientation = $default_orientation ;
} else {
$orientation = strtoupper ( $orientation { 0 } );
$orientation = strtoupper ( $orientation [ 0 ] );
}
if ( in_array ( $orientation , $valid_orientations ) AND ( $orientation != $default_orientation )) {
$this -> CurOrientation = $orientation ;
@@ -6715,7 +6715,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
*/
@@ -6822,7 +6822,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 ) {
@@ -7515,7 +7515,7 @@ class TCPDF {
$cached_file = false ;
}
} else { // image file
if ( $file { 0 } === '*' ) {
if ( $file [ 0 ] === '*' ) {
// image as external stream
$file = substr ( $file , 1 );
$exurl = $file ;
@@ -7604,7 +7604,7 @@ class TCPDF {
// height difference
$hdiff = ( $oldh - $h );
// vertical alignment
switch ( strtoupper ( $fitbox { 1 } )) {
switch ( strtoupper ( $fitbox [ 1 ] )) {
case 'T' : {
break ;
}
@@ -7625,7 +7625,7 @@ class TCPDF {
// width difference
$wdiff = ( $oldw - $w );
// horizontal alignment
switch ( strtoupper ( $fitbox { 0 } )) {
switch ( strtoupper ( $fitbox [ 0 ] )) {
case 'L' : {
if ( $this -> rtl ) {
$x -= $wdiff ;
@@ -7912,7 +7912,7 @@ class TCPDF {
public function set_mqr ( $mqr ) {
if ( ! defined ( 'PHP_VERSION_ID' )) {
$version = PHP_VERSION ;
define ( 'PHP_VERSION_ID' , (( $version { 0 } * 10000 ) + ( $version { 2 } * 100 ) + $version { 4 } ));
define ( 'PHP_VERSION_ID' , (( $version [ 0 ] * 10000 ) + ( $version [ 2 ] * 100 ) + $version [ 4 ] ));
}
if ( PHP_VERSION_ID < 50300 ) {
@ set_magic_quotes_runtime ( $mqr );
@@ -7927,7 +7927,7 @@ class TCPDF {
public function get_mqr () {
if ( ! defined ( 'PHP_VERSION_ID' )) {
$version = PHP_VERSION ;
define ( 'PHP_VERSION_ID' , (( $version { 0 } * 10000 ) + ( $version { 2 } * 100 ) + $version { 4 } ));
define ( 'PHP_VERSION_ID' , (( $version [ 0 ] * 10000 ) + ( $version [ 2 ] * 100 ) + $version [ 4 ] ));
}
if ( PHP_VERSION_ID < 50300 ) {
return @ get_magic_quotes_runtime ();
@@ -8062,7 +8062,7 @@ class TCPDF {
if ( count ( $icc ) > 0 ) {
ksort ( $icc );
$icc = implode ( '' , $icc );
if (( ord ( $icc { 36 } ) != 0x61 ) OR ( ord ( $icc { 37 } ) != 0x63 ) OR ( ord ( $icc { 38 } ) != 0x73 ) OR ( ord ( $icc { 39 } ) != 0x70 )) {
if (( ord ( $icc [ 36 ] ) != 0x61 ) OR ( ord ( $icc [ 37 ] ) != 0x63 ) OR ( ord ( $icc [ 38 ] ) != 0x73 ) OR ( ord ( $icc [ 39 ] ) != 0x70 )) {
// invalid ICC profile
$icc = false ;
}
@@ -8146,9 +8146,9 @@ class TCPDF {
// read transparency info
$t = $this -> rfread ( $f , $n );
if ( $ct == 0 ) {
$trns = array ( ord ( $t { 1 } ));
$trns = array ( ord ( $t [ 1 ] ));
} elseif ( $ct == 2 ) {
$trns = array ( ord ( $t { 1 } ), ord ( $t { 3 } ), ord ( $t { 5 } ));
$trns = array ( ord ( $t [ 1 ] ), ord ( $t [ 3 ] ), ord ( $t [ 5 ] ));
} else {
$pos = strpos ( $t , chr ( 0 ));
if ( $pos !== false ) {
@@ -8494,7 +8494,7 @@ class TCPDF {
$dest = $dest ? 'D' : 'F' ;
}
$dest = strtoupper ( $dest );
if ( $dest { 0 } != 'F' ) {
if ( $dest [ 0 ] != 'F' ) {
$name = preg_replace ( '/[\s]+/' , '_' , $name );
$name = preg_replace ( '/[^a-zA-Z0-9_\.-]/' , '' , $name );
}
@@ -11263,7 +11263,7 @@ class TCPDF {
$font = file_get_contents ( $fontfile );
$compressed = ( substr ( $file , - 2 ) == '.z' );
if (( ! $compressed ) AND ( isset ( $info [ 'length2' ]))) {
$header = ( ord ( $font { 0 } ) == 128 );
$header = ( ord ( $font [ 0 ] ) == 128 );
if ( $header ) {
// strip first binary header
$font = substr ( $font , 6 );
@@ -13396,7 +13396,7 @@ class TCPDF {
* @ public
*/
public function addHtmlLink ( $url , $name , $fill = false , $firstline = false , $color = '' , $style =- 1 , $firstblock = false ) {
if ( ! $this -> empty_string ( $url ) AND ( $url { 0 } == '#' )) {
if ( ! $this -> empty_string ( $url ) AND ( $url [ 0 ] == '#' )) {
// convert url to internal link
$lnkdata = explode ( ',' , $url );
if ( isset ( $lnkdata [ 0 ])) {
@@ -13521,7 +13521,7 @@ class TCPDF {
}
return $returncolor ;
}
if ( $color { 0 } != '#' ) {
if ( $color [ 0 ] != '#' ) {
// COLOR NAME
if ( isset ( $this -> webcolor [ $color ])) {
// web color
@@ -14793,7 +14793,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.
@@ -14809,7 +14809,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.
@@ -14823,7 +14823,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.
@@ -16193,7 +16193,7 @@ class TCPDF {
/**
* Create a javascript PDF string .
* @ protected
* @ author Johannes Gü ntert , Nicola Asuni
* @ author Johannes G<EFBFBD> ntert , Nicola Asuni
* @ since 5.9 . 098 ( 2011 - 06 - 23 )
*/
protected function _putdests () {
@@ -16380,7 +16380,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 ) {
@@ -16409,7 +16409,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 () {
@@ -18350,7 +18350,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
*/
@@ -18368,7 +18368,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
*/
@@ -18391,7 +18391,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
*/
@@ -18483,7 +18483,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
*/
@@ -18884,7 +18884,7 @@ class TCPDF {
// check page for no-write regions and adapt page margins if necessary
list ( $x , $y ) = $this -> checkPageRegions ( $h , $x , $y );
$k = $this -> k ;
if ( $file { 0 } === '@' ) { // image from string
if ( $file [ 0 ] === '@' ) { // image from string
$data = substr ( $file , 1 );
} else { // EPS/AI file
$data = file_get_contents ( $file );
@@ -18997,7 +18997,7 @@ class TCPDF {
$cnt = count ( $lines );
for ( $i = 0 ; $i < $cnt ; ++ $i ) {
$line = $lines [ $i ];
if (( $line == '' ) OR ( $line { 0 } == '%' )) {
if (( $line == '' ) OR ( $line [ 0 ] == '%' )) {
continue ;
}
$len = strlen ( $line );
@@ -19989,19 +19989,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> ]*)<EFBFBD> ([^<EFBFBD> ]*)<EFBFBD> /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> ]*)<EFBFBD> ([^<EFBFBD> ]*)<EFBFBD> /i' , '' , $cssdata );
}
// keep 'all' and 'print' media, other media types are discarded
if ( isset ( $cssblocks [ 'all' ]) AND ! empty ( $cssblocks [ 'all' ])) {
@@ -20093,7 +20093,7 @@ class TCPDF {
$attrib = strtolower ( trim ( $attrib [ 0 ]));
if ( ! empty ( $attrib )) {
// check if matches class, id, attribute, pseudo-class or pseudo-element
switch ( $attrib { 0 } ) {
switch ( $attrib [ 0 ] ) {
case '.' : { // class
if ( in_array ( substr ( $attrib , 1 ), $class )) {
$valid = true ;
@@ -20160,7 +20160,7 @@ class TCPDF {
break ;
}
case ':' : { // pseudo-class or pseudo-element
if ( $attrib { 1 } == ':' ) { // pseudo-element
if ( $attrib [ 1 ] == ':' ) { // pseudo-element
// pseudo-elements are not supported!
// (::first-line, ::first-letter, ::before, ::after)
} else { // pseudo-class
@@ -20837,7 +20837,7 @@ class TCPDF {
$tagname = strtolower ( $tag [ 1 ]);
// check if we are inside a table header
if ( $tagname == 'thead' ) {
if ( $element { 0 } == '/' ) {
if ( $element [ 0 ] == '/' ) {
$thead = false ;
} else {
$thead = true ;
@@ -20852,7 +20852,7 @@ class TCPDF {
} else {
$dom [ $key ][ 'block' ] = false ;
}
if ( $element { 0 } == '/' ) {
if ( $element [ 0 ] == '/' ) {
// *** closing html tag
$dom [ $key ][ 'opening' ] = false ;
$dom [ $key ][ 'parent' ] = end ( $level );
@@ -21066,15 +21066,15 @@ class TCPDF {
}
// font style
if ( isset ( $dom [ $key ][ 'style' ][ 'font-weight' ])) {
if ( strtolower ( $dom [ $key ][ 'style' ][ 'font-weight' ]{ 0 } ) == 'n' ) {
if ( strtolower ( $dom [ $key ][ 'style' ][ 'font-weight' ][ 0 ] ) == 'n' ) {
if ( strpos ( $dom [ $key ][ 'fontstyle' ], 'B' ) !== false ) {
$dom [ $key ][ 'fontstyle' ] = str_replace ( 'B' , '' , $dom [ $key ][ 'fontstyle' ]);
}
} elseif ( strtolower ( $dom [ $key ][ 'style' ][ 'font-weight' ]{ 0 } ) == 'b' ) {
} elseif ( strtolower ( $dom [ $key ][ 'style' ][ 'font-weight' ][ 0 ] ) == 'b' ) {
$dom [ $key ][ 'fontstyle' ] .= 'B' ;
}
}
if ( isset ( $dom [ $key ][ 'style' ][ 'font-style' ]) AND ( strtolower ( $dom [ $key ][ 'style' ][ 'font-style' ]{ 0 } ) == 'i' )) {
if ( isset ( $dom [ $key ][ 'style' ][ 'font-style' ]) AND ( strtolower ( $dom [ $key ][ 'style' ][ 'font-style' ][ 0 ] ) == 'i' )) {
$dom [ $key ][ 'fontstyle' ] .= 'I' ;
}
// font color
@@ -21093,13 +21093,13 @@ class TCPDF {
foreach ( $decors as $dec ) {
$dec = trim ( $dec );
if ( ! $this -> empty_string ( $dec )) {
if ( $dec { 0 } == 'u' ) {
if ( $dec [ 0 ] == 'u' ) {
// underline
$dom [ $key ][ 'fontstyle' ] .= 'U' ;
} elseif ( $dec { 0 } == 'l' ) {
} elseif ( $dec [ 0 ] == 'l' ) {
// line-trough
$dom [ $key ][ 'fontstyle' ] .= 'D' ;
} elseif ( $dec { 0 } == 'o' ) {
} elseif ( $dec [ 0 ] == 'o' ) {
// overline
$dom [ $key ][ 'fontstyle' ] .= 'O' ;
}
@@ -21118,7 +21118,7 @@ class TCPDF {
}
// check for text alignment
if ( isset ( $dom [ $key ][ 'style' ][ 'text-align' ])) {
$dom [ $key ][ 'align' ] = strtoupper ( $dom [ $key ][ 'style' ][ 'text-align' ]{ 0 } );
$dom [ $key ][ 'align' ] = strtoupper ( $dom [ $key ][ 'style' ][ 'text-align' ][ 0 ] );
}
// check for CSS border properties
if ( isset ( $dom [ $key ][ 'style' ][ 'border' ])) {
@@ -21282,9 +21282,9 @@ class TCPDF {
// font size
if ( isset ( $dom [ $key ][ 'attribute' ][ 'size' ])) {
if ( $key > 0 ) {
if ( $dom [ $key ][ 'attribute' ][ 'size' ]{ 0 } == '+' ) {
if ( $dom [ $key ][ 'attribute' ][ 'size' ][ 0 ] == '+' ) {
$dom [ $key ][ 'fontsize' ] = $dom [( $dom [ $key ][ 'parent' ])][ 'fontsize' ] + intval ( substr ( $dom [ $key ][ 'attribute' ][ 'size' ], 1 ));
} elseif ( $dom [ $key ][ 'attribute' ][ 'size' ]{ 0 } == '-' ) {
} elseif ( $dom [ $key ][ 'attribute' ][ 'size' ][ 0 ] == '-' ) {
$dom [ $key ][ 'fontsize' ] = $dom [( $dom [ $key ][ 'parent' ])][ 'fontsize' ] - intval ( substr ( $dom [ $key ][ 'attribute' ][ 'size' ], 1 ));
} else {
$dom [ $key ][ 'fontsize' ] = intval ( $dom [ $key ][ 'attribute' ][ 'size' ]);
@@ -21326,10 +21326,10 @@ class TCPDF {
if (( $dom [ $key ][ 'value' ] == 'pre' ) OR ( $dom [ $key ][ 'value' ] == 'tt' )) {
$dom [ $key ][ 'fontname' ] = $this -> default_monospaced_font ;
}
if (( $dom [ $key ][ 'value' ]{ 0 } == 'h' ) AND ( intval ( $dom [ $key ][ 'value' ]{ 1 } ) > 0 ) AND ( intval ( $dom [ $key ][ 'value' ]{ 1 } ) < 7 )) {
if (( $dom [ $key ][ 'value' ][ 0 ] == 'h' ) AND ( intval ( $dom [ $key ][ 'value' ][ 1 ] ) > 0 ) AND ( intval ( $dom [ $key ][ 'value' ][ 1 ] ) < 7 )) {
// headings h1, h2, h3, h4, h5, h6
if ( ! isset ( $dom [ $key ][ 'attribute' ][ 'size' ]) AND ! isset ( $dom [ $key ][ 'style' ][ 'font-size' ])) {
$headsize = ( 4 - intval ( $dom [ $key ][ 'value' ]{ 1 } )) * 2 ;
$headsize = ( 4 - intval ( $dom [ $key ][ 'value' ][ 1 ] )) * 2 ;
$dom [ $key ][ 'fontsize' ] = $dom [ 0 ][ 'fontsize' ] + $headsize ;
}
if ( ! isset ( $dom [ $key ][ 'style' ][ 'font-weight' ])) {
@@ -21391,7 +21391,7 @@ class TCPDF {
}
// check for text alignment
if ( isset ( $dom [ $key ][ 'attribute' ][ 'align' ]) AND ( ! $this -> empty_string ( $dom [ $key ][ 'attribute' ][ 'align' ])) AND ( $dom [ $key ][ 'value' ] !== 'img' )) {
$dom [ $key ][ 'align' ] = strtoupper ( $dom [ $key ][ 'attribute' ][ 'align' ]{ 0 } );
$dom [ $key ][ 'align' ] = strtoupper ( $dom [ $key ][ 'attribute' ][ 'align' ][ 0 ] );
}
// check for text rendering mode (the following attributes do not exist in HTML)
if ( isset ( $dom [ $key ][ 'attribute' ][ 'stroke' ])) {
@@ -23116,7 +23116,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
}
case 'img' : {
if ( isset ( $tag [ 'attribute' ][ 'src' ])) {
if ( $tag [ 'attribute' ][ 'src' ]{ 0 } === '@' ) {
if ( $tag [ 'attribute' ][ 'src' ][ 0 ] === '@' ) {
// data stream
$tag [ 'attribute' ][ 'src' ] = '@' . base64_decode ( substr ( $tag [ 'attribute' ][ 'src' ], 1 ));
$type = '' ;
@@ -23178,7 +23178,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$imglink = '' ;
if ( isset ( $this -> HREF [ 'url' ]) AND ! $this -> empty_string ( $this -> HREF [ 'url' ])) {
$imglink = $this -> HREF [ 'url' ];
if ( $imglink { 0 } == '#' ) {
if ( $imglink [ 0 ] == '#' ) {
// convert url to internal link
$lnkdata = explode ( ',' , $imglink );
if ( isset ( $lnkdata [ 0 ])) {
@@ -27144,7 +27144,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// convert SVG to raster image using GD or ImageMagick libraries
return $this -> Image ( $file , $x , $y , $w , $h , 'SVG' , $link , $align , true , 300 , $palign , false , false , $border , false , false , false );
}
if ( $file { 0 } === '@' ) { // image from string
if ( $file [ 0 ] === '@' ) { // image from string
$this -> svgdir = '' ;
$svgdata = substr ( $file , 1 );
} else { // SVG file
@@ -28054,7 +28054,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 ) {
@@ -28080,7 +28080,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 ) {
@@ -28631,7 +28631,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$img = '@' . base64_decode ( substr ( $img , strlen ( $m [ 0 ])));
} else {
// fix image path
if ( ! $this -> empty_string ( $this -> svgdir ) AND (( $img { 0 } == '.' ) OR ( basename ( $img ) == $img ))) {
if ( ! $this -> empty_string ( $this -> svgdir ) AND (( $img [ 0 ] == '.' ) OR ( basename ( $img ) == $img ))) {
// replace relative path with full server path
$img = $this -> svgdir . '/' . $img ;
}